28

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

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

  • Started celerycam with default snapshot frequency of 1 second.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).

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

rubayeet
  • 9,269
  • 8
  • 46
  • 55

2 Answers2

31

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

asksol
  • 19,129
  • 5
  • 61
  • 68
  • 1
    thanks for the reply. this Django Admin Monitor in the docs is based on non-DB based backend? – rubayeet Mar 28 '11 at 06:29
  • Yeah, it currently works with RabbitMQ and Redis (that I know of, haven't tried others). – asksol Mar 28 '11 at 11:53
  • It should be possible to add support for this though. The problem is that it is very ineffective as it is: An event is a message, the celeryev takes snapshots of these messages and stores them in the db. But if the messages are stored on the db it means you write the same data twice. If we should support this then celeryd should just write it to the djcelery.models.TaskState model directly. – asksol Mar 28 '11 at 11:55
  • 14
    Shouldn't something show up in the logs saying that the current configuration is not supported? – Leopd Jul 15 '11 at 17:53
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.

Mo J. Mughrabi
  • 6,747
  • 16
  • 85
  • 143