mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-12-03 10:36:45 +01:00
tasker: add support for reporting panics
This commit is contained in:
parent
b8ebf88f36
commit
f4e3aedf33
@ -72,6 +72,8 @@ func observibilityMiddleware() asynq.MiddlewareFunc {
|
||||
err := handler.ProcessTask(ctx, task)
|
||||
if err != nil && isFailureHandler(err) {
|
||||
lo.Error("tasker: handler error", "err", err, "task_type", task.Type(), "task_id", taskId)
|
||||
} else if asynq.IsPanicError(err) {
|
||||
lo.Error("tasker: handler panic", "err", err, "task_type", task.Type(), "task_id", taskId)
|
||||
} else {
|
||||
lo.Info("tasker: process task", "task_type", task.Type(), "task_id", taskId)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user