我使用Django-q (https://django-q.readthedocs.io)在Django框架中排队。当我使用async_task时我有一个异步函数:
async_task('sms.tasks.send',
username=username,
password=password,
text=text,
to=to,
path=path,
)一切都很好,工作也很好。但当我在日程安排中使用它时:
schedule('sms.tasks.send',
username=username,
password=password,
text=text,
to=to,
path=path,
next_run=scheduled_time)尽管没有什么改变,甚至在Scheduled task中所有的Kwargs都存在,但在执行过程中,没有任何Kwargs通过。有没有人在Django-q问题上遇到过这个问题?
发布于 2020-02-19 08:15:22
问题解决了。记住,不要将模型实例作为Kwarg参数传递。这就是问题所在。
https://stackoverflow.com/questions/60294292
复制相似问题