Increase celery retry time each retry cycle

后端 未结 3 698
野的像风
野的像风 2020-12-28 18:46

I do retries with celery like in the Docs-Example:

@task()
def add(x, y):
    try:
        ...
    except Exception, exc:
        add.retry(exc=exc, countdow         


        
3条回答
  •  抹茶落季
    2020-12-28 19:19

    Keep a variable with your last retry time in it, and multiply it by 2 each time until it exceeds whatever level you want (or, keep a count if you prefer a certain number of times...)

提交回复
热议问题