Add SkipRetry error to be used as a return value from Handler

This commit is contained in:
Ken Hibino
2021-01-11 07:21:50 -08:00
parent a150d18ed7
commit 7235041128
4 changed files with 48 additions and 4 deletions

View File

@@ -392,6 +392,9 @@ func NewServer(r RedisConnOpt, cfg Config) *Server {
//
// If ProcessTask return a non-nil error or panics, the task
// will be retried after delay.
// One exception to this rule is when ProcessTask returns SkipRetry error.
// If the returned error is SkipRetry or the error wraps SkipRetry, retry is
// skipped and task will be archived instead.
type Handler interface {
ProcessTask(context.Context, *Task) error
}