Retrying a task pushes it back into the queue while increasing its run count by one. It works by raising a WorkerRetry exception, which causes the worker to interrupt. Therefore, you should only call retry if you don't have any more work to do. If you call retry and catch the exception, the worker will not be interrupted but the task will be pushed back to the queue anyway. Retrying the task makes it a failed task. consumable_from is the Unix time represents the point in time when the task becomes consumable and can be popped from the queue. None means now. A temporary failure can be retried at a later time using the consumable_from parameter.
Retry from handlers
retry should never be called from the following handlers: