什么是django-celery(djcelery)表? [英] What are the django-celery (djcelery) tables for?

查看:400
本文介绍了什么是django-celery(djcelery)表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行syncdb时,我注意到很多表创建如下:

When I run syncdb, I notice a lot of tables created like:


  • djcelery_crontabschedule

  • ...

  • djcelery_taskstate

django-kombu正在提供传输,所以它可以不能与实际的队列相关。即使我执行任务,我仍然看不到这些表中的任何填充。这些表用于什么?监控的目的 - 如果我启用它?

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?

如果是这样,如果我做一个AsyncResult()的查找也是如此,我猜这实际上是通过django-kombu表而不是djcelery查找任务结果?

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?

谢谢。

推荐答案

由守护进程celerycam填充的芹菜task_state表仅用于监控目的。

The celery task_state table, populated by the daemon celerycam, is just for monitoring purposes.

其他表,如crontabschedule间隔用于通过使用django后端数据库来调度周期性任务。当您以节拍模式(-B)启动芹菜时,以及在设置中设置此变量时使用这些表格

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

CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"

以这种方式你告诉芹菜使用django db来计划任务。

In this way you tell celery to use the django db for schedule tasks.

这篇关于什么是django-celery(djcelery)表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆