Invoke error handler when ctx.Done channel is closed

This commit is contained in:
Ken Hibino
2020-07-04 06:31:56 -07:00
parent 8d43fe407a
commit 007fac8055
2 changed files with 4 additions and 1 deletions

View File

@@ -125,7 +125,7 @@ type Config struct {
ShutdownTimeout time.Duration
}
// An ErrorHandler handles errors returned by the task handler.
// An ErrorHandler handles an error occured during task processing.
type ErrorHandler interface {
HandleError(ctx context.Context, task *Task, err error)
}