|
|
@@ -6,6 +6,7 @@ import (
|
|
|
"time"
|
|
|
|
|
|
//"github.com/grafana/grafana/pkg/bus"
|
|
|
+ "github.com/grafana/grafana/pkg/bus"
|
|
|
"github.com/grafana/grafana/pkg/log"
|
|
|
m "github.com/grafana/grafana/pkg/models"
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
|
@@ -132,6 +133,14 @@ func (this *Scheduler) HandleResponses() {
|
|
|
if this.jobs[response.Id] != nil {
|
|
|
this.jobs[response.Id].running = false
|
|
|
}
|
|
|
+ cmd := m.UpdateAlertStateCommand{
|
|
|
+ AlertId: response.Id,
|
|
|
+ NewState: response.State,
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := bus.Dispatch(&cmd); err != nil {
|
|
|
+ log.Error(1, "failed to save state", err)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|