django-celery (djcelery) 表有什么用?
当我运行syncdb时,我注意到创建了很多表,例如:
- djcelery_crontabschedule
- ...
- djcelery_taskstate
django-kombu 正在提供传输,因此它不能与实际队列相关。即使当我运行任务时,我仍然看到这些表中没有填充任何内容。这些表是用来做什么的?仅用于监控目的——如果我启用它?
如果是这样,如果我查找 AsyncResult(),我猜这实际上是通过 django-kombu 表而不是 djcelery 查找任务结果,这也是真的吗?
谢谢。
When I run syncdb, I notice a lot of tables created like:
- djcelery_crontabschedule
- ...
- djcelery_taskstate
django-kombu is providing the transport, so it can't be related to the actual queue. Even when I run tasks, I still see nothing populated in these tables. What are these tables used for? Monitoring purposes only -- if I enable it?
If so, is it also true that if I do a lookup of AsyncResult(), I'm guessing that is actually looking up the task result via the django-kombu tables instead of djcelery?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
celery task_state 表由守护进程 celerycam 填充,仅用于监视目的。
其他表,如“crontabschedule”“intervals”等用于通过使用 django 后端数据库来调度定期任务。当您以节拍模式(-B)启动 celery 以及在设置中设置此 var 时,将使用这些表
通过这种方式,您可以告诉 celery 使用 django db 来执行计划任务。
The celery task_state table, populated by the daemon celerycam, is just for monitoring purposes.
The other tables, like "crontabschedule" "intervals" etc. are for scheduling periodic tasks by using the django backend db. These tables are used when you launch celery in beat mode (-B) and when you have this var set in the settings
In this way you tell celery to use the django db for schedule tasks.