From 10d24da369b091f31fb8eeb9fd68689dac3420a2 Mon Sep 17 00:00:00 2001 From: Victor Boivie Date: Tue, 10 May 2016 08:35:11 +0200 Subject: [PATCH] Minor refactoring --- alert/slack.go | 1 - alert/webhooks.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/alert/slack.go b/alert/slack.go index 14df864..96b0c02 100644 --- a/alert/slack.go +++ b/alert/slack.go @@ -65,7 +65,6 @@ func (m slackAlerter) Notify(cfg config.ConfigAlert, ev AlertInfo) { } log.Debug("Performing slack request at %v", m.cfg.WebhookUrl) - goreq.SetConnectTimeout(5 * time.Second) req := goreq.Request{ Method: "POST", Uri: m.cfg.WebhookUrl, diff --git a/alert/webhooks.go b/alert/webhooks.go index f7d5e2d..559bf7d 100644 --- a/alert/webhooks.go +++ b/alert/webhooks.go @@ -13,7 +13,6 @@ func (m webhooksAlerter) Notify(cfg config.ConfigAlert, ev AlertInfo) { if cfg.Webhook != "" { log.Infof("Sending webhook alert to %s", cfg.Webhook) - goreq.SetConnectTimeout(5 * time.Second) req := goreq.Request{ Uri: cfg.Webhook, Accept: "application/json", @@ -29,7 +28,8 @@ func (m webhooksAlerter) Notify(cfg config.ConfigAlert, ev AlertInfo) { Name: ev.View.Name, FromState: strings.ToUpper(ev.Previous), ToState: strings.ToUpper(ev.Current), - IncidentNbr: ev.View.IncidentNbr}, + IncidentNbr: ev.View.IncidentNbr, + }, } req.AddHeader("X-Lovebeat", "1")