芹菜在一个任务中调用另一个任务并得到值

2024-09-27 07:33:10 发布

您现在位置:Python中文网/ 问答频道 /正文

@app.task(bing=True)
def add1(a,b):

    x = add2.delay(a, b, 2)

    print x.get()

    return x

@app.task()
def add2(a, b, c):
    return a+b+c

这样,就是错误。在

^{pr2}$

在Celery 3.2中,这将导致异常 而不仅仅是一个警告。在

warnings.warn(RuntimeWarning(E_WOULDBLOCK))

Tags: trueapp警告taskgetreturndef错误

热门问题