Просмотр исходного кода

fix(png-renderer): increase timeouts

bergquist 9 лет назад
Родитель
Сommit
a49c21df3a
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      pkg/services/alerting/notifier.go
  2. 1 1
      pkg/services/notifications/webhook.go

+ 2 - 2
pkg/services/alerting/notifier.go

@@ -72,8 +72,8 @@ func (n *RootNotifier) uploadImage(context *EvalContext) error {
 		Url:       imageUrl,
 		Width:     "800",
 		Height:    "400",
-		SessionId: "123",
-		Timeout:   "10",
+		SessionId: "cef0256d482b4293",
+		Timeout:   "30",
 	}
 
 	if imagePath, err := renderer.RenderToPng(renderOpts); err != nil {

+ 1 - 1
pkg/services/notifications/webhook.go

@@ -44,7 +44,7 @@ func sendWebRequest(webhook *Webhook) error {
 	webhookLog.Debug("Sending webhook", "url", webhook.Url)
 
 	client := http.Client{
-		Timeout: time.Duration(3 * time.Second),
+		Timeout: time.Duration(10 * time.Second),
 	}
 
 	request, err := http.NewRequest("POST", webhook.Url, bytes.NewReader([]byte(webhook.Body)))