2
0
mirror of https://github.com/hibiken/asynq.git synced 2026-04-23 02:15:50 +08:00

feat: revoke the task to modify task parameters and enqueue new task with the same task id (#882)

This commit is contained in:
kanzihuang
2024-10-19 15:06:12 +08:00
committed by GitHub
parent ff7ef48463
commit ae478d5b22
3 changed files with 42 additions and 8 deletions

View File

@@ -633,6 +633,10 @@ func NewServerFromRedisClient(c redis.UniversalClient, cfg Config) *Server {
// One exception to this rule is when ProcessTask returns a SkipRetry error.
// If the returned error is SkipRetry or an error wraps SkipRetry, retry is
// skipped and the task will be immediately archived instead.
//
// One exception to this rule is when ProcessTask returns a RevokeTask error.
// If the returned error is RevokeTask or an error wraps RevokeTask, the task
// will not be retried or archived.
type Handler interface {
ProcessTask(context.Context, *Task) error
}