mirror of
https://github.com/grafana/grafana.git
synced 2025-01-10 08:03:58 -06:00
feat(alerting): recover from panic
This commit is contained in:
parent
96008c9738
commit
2c7dbde06a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user