Fix bug in report_create event

This commit is contained in:
Arturo Filastò 2018-09-27 11:12:22 +02:00
parent 6735c8d617
commit bc5fe7d8bf

View File

@ -142,12 +142,17 @@ func (c *Controller) Init(nt *mk.Nettest) error {
log.Debugf("%s", e.Key) log.Debugf("%s", e.Key)
}) })
nt.On("status.report_created", func(e mk.Event) { nt.On("status.report_create", func(e mk.Event) {
log.Debugf("%s", e.Key) log.Debugf(color.RedString(e.Key))
reportID = sql.NullString{String: e.Value.ReportID, Valid: true} 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) { nt.On("status.geoip_lookup", func(e mk.Event) {
log.Debugf(color.RedString(e.Key)) log.Debugf(color.RedString(e.Key))
}) })
@ -199,11 +204,6 @@ func (c *Controller) Init(nt *mk.Nettest) error {
log.Debugf("%v", e.Value) 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) { nt.On("failure.report_close", func(e mk.Event) {
log.Debugf(color.RedString(e.Key)) log.Debugf(color.RedString(e.Key))
log.Debugf("%v", e.Value) log.Debugf("%v", e.Value)