1
votes

my environment is composed of django, celery and mongodb as a back end.

I managed to create a periodic tasks using djcelery admin interface and after starting celerybeat I can see it runs. This task is simple: it just makes an addition of 2 integers as proposed in celery tutorial.

I launch celeryd with the following command line

python manage.py celeryd -E -l INFO --settings=settings

celerybeat with the following command line:

python manage.py celerybeat --settings=settings

and finally celerycam to take snapshots of my tasks:

python manage.py celerycam --settings=settings

When I try to display celery tasks in djcelery admin however I keep having the same error message, does anyone know how to fix it ?

Error stack django admin

2
I am using the following libraries: APScheduler==2.0.2 Django==1.3.1 amqplib==1.0.2 anyjson==0.3.1 celery==2.4.6 celery-with-mongodb==2.4.1 django-celery==2.4.2 django-mongodb-engine==0.4.0 django-picklefield==0.1.9 djangotoolbox==0.9.2 kombu==2.0.0 pymongo==2.1 python-dateutil==1.5 - dry

2 Answers

2
votes

MongoDB does not support advanced date/time lookups like __day, __year, __hour etc, this is why the date_hierarchy thing crashes.

However, the error message is pretty useless. Please open a ticket at https://github.com/django-nonrel/mongodb-engine/issues/ with a link to the full stacktrace (you can get that by clicking the "paste" button on the Django error page).

Possible workarounds:

  1. Override the djcelery admin that causes the trouble, removing the date_hierarchy option
  2. Use django-dbindexer to add support for these lookups by using denormalization.
0
votes

In this question it stated that you should set specific Scheduler for the djcelery, but though I have configured this, my admin tasks page is empty (no exception, but does not get populated).

I'm using mysql as a storage for tasks.