Django芹菜:管理界面显示零任务/工作人员

时间:2021-11-08 19:18:18

I've setup Celery with Django ORM as back-end. Trying to monitor what's going on behind the scene.

我用Django ORM作为后端设置了芹菜。试图监控幕后发生的事情。

  • I've started celeryd with -E flag python manage.py celeryd -E -l INFO -v 1 -f /path/to/celeryd.log

    我已经用-E标志python管理启动了celeryd。圆周率-E -l INFO - v1 -f /path/to/celeryd.log

  • Started celerycam with default snapshot frequency of 1 second.python mannage.py celerycam

    启动celerycam的默认快照频率为1秒。python mannage。py celerycam

I can see the tasks being executed(in the celery log) and results being stored(data models periodically being changed by those tasks). However the Task/Worker pages in Django admin panel showing zero items. Same thing happens when I start celeryev(shows o events/tasks/workers).

我可以看到正在执行的任务(在芹菜日志中)和正在存储的结果(这些任务周期性地更改数据模型)。然而,Django管理面板中的任务/工作页面显示零项。当我启动celeryev(显示o事件/任务/工人)时也会发生同样的事情。

Is there any additional configuration settings need to be changed to achieve monitoring?

是否需要更改其他配置设置以实现监视?

My software stack: Django 1.1, Celery 2.2.4, Python 2.4

我的软件栈:Django 1.1,芹菜2.2.4,Python 2.4

2 个解决方案

#1


31  

The event snapshots doesn't currently work with the Django ORM transport.

事件快照目前不能用于Django ORM传输。

#2


8  

I don't know if this will be helpful, but did you try running ./manage.py celerycam, it will capture the data into the database every 1 seconds thus you will be able to see online workers and tasks in the django admin interface.

我不知道这是否有用,但你试过跑步吗?py celerycam,它每1秒就会将数据捕获到数据库中,这样您就可以在django管理界面中看到在线工作人员和任务。

#1


31  

The event snapshots doesn't currently work with the Django ORM transport.

事件快照目前不能用于Django ORM传输。

#2


8  

I don't know if this will be helpful, but did you try running ./manage.py celerycam, it will capture the data into the database every 1 seconds thus you will be able to see online workers and tasks in the django admin interface.

我不知道这是否有用,但你试过跑步吗?py celerycam,它每1秒就会将数据捕获到数据库中,这样您就可以在django管理界面中看到在线工作人员和任务。