From afe7194f6cfd07398d05580b0c4bbe07d4a49b27 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Sat, 26 Sep 2015 18:12:56 +0200 Subject: [PATCH] Fix notifyFunc specification --- dispatch.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dispatch.go b/dispatch.go index 92f93ef9..aad742df 100644 --- a/dispatch.go +++ b/dispatch.go @@ -64,7 +64,6 @@ func (d *Dispatcher) Run() { d.ctx, d.cancel = context.WithCancel(context.Background()) updates := d.alerts.IterActive() - defer updates.Close() d.run(updates.Next()) @@ -109,8 +108,7 @@ func (d *Dispatcher) Stop() { // notifyFunc is a function that performs notifcation for the alert // with the given fingerprint. It aborts on context cancelation. -// It returns whether the alert has successfully been communiated as -// resolved. +// Returns false iff notifying failed. type notifyFunc func(context.Context, ...*types.Alert) bool // notifyFunc returns a function which performs a notification @@ -134,8 +132,6 @@ func (d *Dispatcher) notifyFunc(dest string) notifyFunc { // and insert it. func (d *Dispatcher) processAlert(alert *types.Alert, opts *RouteOpts) { group := model.LabelSet{} - fmt.Println("processing", alert) - defer fmt.Println("proecssing done", alert) for ln, lv := range alert.Labels { if _, ok := opts.GroupBy[ln]; ok {