Multiple Projects on Server using django-celery

460 views
Skip to first unread message

Stephen McDonald

unread,
Jul 7, 2011, 6:20:18 PM7/7/11
to celery-users
Hi there,

Firstly I'd just like to thank Ask for Celery - it's an amazing piece
of software.

I have two different Django projects running on the same server, each
using django-celery with almost no settings defined apart from
CELERY_IMPORTS. celeryd is started using mange.py and is managed using
supervisord. Everything works fine with only one project running, but
once the second is running then tasks from the first project seem to
intermittently never get executed. If I shut down the second project
everything works fine again. It seems obvious that I need to isolate
these somehow, I'm just wonder which setting(s) need to be defined.
Would providing a unique value per project for
CELERY_DEFAULT_ROUTING_KEY or CELERY_DEFAULT_QUEUE suffice?

Cheers,
Steve

Ask Solem

unread,
Jul 8, 2011, 6:48:15 AM7/8/11
to celery...@googlegroups.com


AMQP has virtual hosts, which is there to separate applications.
So you probably want:

BROKER_VHOST = "/app1"
BROKER_VHOST = "/app2"

Sadly, with Django's global settings it's very hard to
share the same worker process for multiple applications.


--
Ask Solem
twitter.com/asksol | +44 (0)7713357179

Stephen McDonald

unread,
Jul 8, 2011, 10:03:36 AM7/8/11
to celery-users
Thanks Ask I'll give that a shot.

Cheers,
Steve
Reply all
Reply to author
Forward
0 new messages