Ciao a tutti,
sto cercando la configrazione ottimale per fare partire celery con django in produzione. Uso nginx + uwsgi per l'applicazione principale e credevo leggendo [1] [2] che smart-attach-daemon avrebbe potuo risolvere il problema di garantirmi che un reload di uwsgi (uwsgi --reload) inviasse un segnale al processo di celery. Forse ho compreso male la documentazione che in effetti non dice esplicitamente cosa dovrebbe succedere ma solo :: Pidfile governed processes can survive death or reload of the master so long as their pidfiles are available and the pid contained therein matches a running pid. This is the best choice for processes requiring longer persistence, and for which a brutal kill could mean loss of data such as a database. Avendo messo una mia script di test non vedo arrivare alcun segnale. Mi sbaglio? che dovrebbe succedere veramente con smart-attach-daemon? La parte che reputo interessante della conf di uwsgi รจ questa:: env = DJANGO_SETTINGS_MODULE=web.settings env = HOME=/tmp master = true module = django.core.handlers.wsgi:WSGIHandler() prj_dir = /home/www/office.cogema.it celery_pid = /var/run/uwsgi/cogema-celery.pid home = %(prj_dir)/parts/vpython smart-attach-daemon = %(celery_pid) /usr/local/sbin/test-signals.py %(celery_pid) test-signals.py logga ogni segnale che invio con kill, e non logga nulla quando lancio uwsgi --reload sandro *:-) [1] http://uwsgi-docs.readthedocs.org/en/latest/Options.html#smart-attach-daemon [2] http://uwsgi-docs.readthedocs.org/en/latest/AttachingDaemons.html -- Sandro Dentella *:-) http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python