from celery.decorators import task
@task()
def add(x, y, **kwargs):
if not x or not y:
try:
raise Exception("test error")
except Exception, e:
add.retry(args=[x, y], exc=e, countdown=30, kwargs=kwargs)
return x+y
Celery任务失败重试
最新推荐文章于 2024-05-12 13:07:17 发布