在What’s new in Celery 4.0 (latentcall)的描述中,写了以下内容:
If you’re still using class based tasks, then you need to register these manually: ...
以及:
The best practice is to use custom task classes only for overriding general behavior, and then using the task decorator to realize the task.
两者都建议您使用基于函数的任务来完成芹菜任务。为什么芹菜更喜欢基于函数的任务而不是基于类的任务?我找不到任何理由阻止人们用类编写任务是有意义的
目前没有回答
相关问题 更多 >
编程相关推荐