pyramid_celery and mod_wsgi

47 views
Skip to first unread message

Ottavio

unread,
Mar 21, 2012, 12:48:09 PM3/21/12
to pylons-...@googlegroups.com
Hi,

I developed a small application to send emails from a web app without blocking even if the mail server is slow by using pyramid_celery. I like its api, and I really would like to use it in bigger projects.

BUT there's a problem: I always run

pceleryd
./development.ini

from the commands line, but I would like not to do this. I run my application with mod_wsgi, and running pceleryd from a shell is the opposite that I'd like to do.

Is there a way to avoid running pceleryd from the command line? Is there some equivalent directive that I can use in apache virtualhost configuration?

John Anderson

unread,
Mar 21, 2012, 1:21:07 PM3/21/12
to pylons-...@googlegroups.com
You need to think of celeryd as a service like postgresql or redis, it is not part of the web application itself and should be configured as a service and run separately outside of apache.

Two good options for this:
supervisord
init scripts in linux 

Ottavio

unread,
Mar 21, 2012, 1:31:42 PM3/21/12
to pylons-...@googlegroups.com


Il giorno mercoledì 21 marzo 2012 18:21:07 UTC+1, Sontek ha scritto:
You need to think of celeryd as a service like postgresql or redis, it is not part of the web application itself and should be configured as a service and run separately outside of apache.

Two good options for this:
supervisord
init scripts in linux

ok, that could be fine, but there's one thing I don't understand.

Can I run a single pceleryd for all my applications? Or do I have to run a pceleryd instance for every program?

Because, I define my tasks in tasks.py and it's ok. But then I don't understand if I have to run a different pceleryd for each program. And if yes, what do I have to change in development.ini to have all of them working together?

Thank you,

Ottavio
Reply all
Reply to author
Forward
0 new messages