Delay and Retry Tasks
masterDelaying Tasks
Set the ETA field in the Signature to a *time.Time to delay execution.
eta := time.Now().UTC().Add(time.Second * 5)
signature.ETA = &etaRetrying Tasks
Set RetryCount in the Signature to specify how many times a failed task should be retried. Machinery uses a Fibonacci sequence to space out retries.
signature.RetryCount = 3Alternatively, return tasks.ErrRetryTaskLater from within the task function to specify a custom delay.