Commit 2c7dbde0 by bergquist

feat(alerting): recover from panic

parent 96008c97
......@@ -106,6 +106,13 @@ func (e *Engine) processJob(grafanaCtx context.Context, job *Job) error {
done := make(chan struct{})
go func() {
defer func() {
if err := recover(); err != nil {
e.log.Error("Alert Panic", "error", err, "stack", log.Stack(1))
close(done)
}
}()
e.evalHandler.Eval(evalContext)
e.resultHandler.Handle(evalContext)
close(done)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment