|
|
|
@ -129,9 +129,11 @@ func (this *Scheduler) Executor(executor Executor) { |
|
|
|
func (this *Scheduler) HandleResponses() { |
|
|
|
func (this *Scheduler) HandleResponses() { |
|
|
|
for response := range this.responseQueue { |
|
|
|
for response := range this.responseQueue { |
|
|
|
log.Info("Response: alert %d returned %s", response.id, response.state) |
|
|
|
log.Info("Response: alert %d returned %s", response.id, response.state) |
|
|
|
|
|
|
|
if this.jobs[response.id] != nil { |
|
|
|
this.jobs[response.id].running = false |
|
|
|
this.jobs[response.id].running = false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (this *Scheduler) Measure(exec Executor, rule *AlertJob) { |
|
|
|
func (this *Scheduler) Measure(exec Executor, rule *AlertJob) { |
|
|
|
now := time.Now() |
|
|
|
now := time.Now() |
|
|
|
|