Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
boivie committed May 10, 2016
1 parent 0c29db5 commit 10d24da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion alert/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions alert/webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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")
Expand Down

0 comments on commit 10d24da

Please sign in to comment.