芹菜参数具有正确的参数数量

2024-03-28 17:13:24 发布

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

我正在使用芹菜4.0,并跟踪这个网站。http://docs.celeryproject.org/en/latest/userguide/tasks.html#blog-tasks-py

在视图.py在

task = test2.delay(document.name, document.id)

在任务.py在

^{pr2}$

但是,它抛出一个异常TypeError: test2() takes exactly 1 argument (2 given)。这是有趣的,因为我有2个论点,它在我显示的网站工作。在


Tags: pyorghttpdocs网站htmlblogdocument