Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use attach-daemon or smart-attach daemon to autostart celery with UWSGI (and easily update the tasks)

First off - I am aware UWSGI suggest using smart-attach-daemon

from: http://uwsgi-docs.readthedocs.io/en/latest/AttachingDaemons.html

Managing celery:

[uwsgi]
master = true
socket = :3031
smart-attach-daemon = /tmp/celery.pid celery -A tasks worker --pidfile=/tmp/celery.pid

However, it seems when I push updates to the server, Celery tasks are not updated - to make this happen it seems I have do issue killall celery - which it seems would be practically automated by using attach-daemon to start it instead?

Am I missing something here, is there a better solution than either killing celery instances, or using attach-daemon ?

like image 517
Chozabu Avatar asked Jun 09 '16 13:06

Chozabu


1 Answers

You'd better use attach-daemon, because smart-attach-daemon means that you will manage your smart daemon restarting on your own.

Since uwsgi 2.0 there are also 'attach-daemon2' which have touch option.

like image 138
atn Avatar answered Nov 14 '22 09:11

atn