From bc5fe7d8bfcb8c3458ff0fedc333b3ffbdb5ec5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Thu, 27 Sep 2018 11:12:22 +0200 Subject: [PATCH] Fix bug in report_create event --- nettests/nettests.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nettests/nettests.go b/nettests/nettests.go index 5092659..603f68c 100644 --- a/nettests/nettests.go +++ b/nettests/nettests.go @@ -142,12 +142,17 @@ func (c *Controller) Init(nt *mk.Nettest) error { log.Debugf("%s", e.Key) }) - nt.On("status.report_created", func(e mk.Event) { - log.Debugf("%s", e.Key) + nt.On("status.report_create", func(e mk.Event) { + log.Debugf(color.RedString(e.Key)) reportID = sql.NullString{String: e.Value.ReportID, Valid: true} }) + nt.On("failure.report_create", func(e mk.Event) { + log.Debugf(color.RedString(e.Key)) + log.Debugf("%v", e.Value) + }) + nt.On("status.geoip_lookup", func(e mk.Event) { log.Debugf(color.RedString(e.Key)) }) @@ -199,11 +204,6 @@ func (c *Controller) Init(nt *mk.Nettest) error { log.Debugf("%v", e.Value) }) - nt.On("failure.report_create", func(e mk.Event) { - log.Debugf(color.RedString(e.Key)) - log.Debugf("%v", e.Value) - }) - nt.On("failure.report_close", func(e mk.Event) { log.Debugf(color.RedString(e.Key)) log.Debugf("%v", e.Value)