python - Cannot setup Celery as daemon on server -


i cannot setup celery daemon on server (django 1.6.11, celery 3.1, ubuntu 14.04) tried lot of options, can place full setting of working configuration run celery daemon?

i disappointed official docs http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#generic-init-scripts - none of working, no full step-by-step tutorial. 0 (!!!) videos on youtube on how setup daemon.

now able run celery simple celery worker -a engine -l info -e tasks django executed successfully.

i have done configs:

/etc/defaults/celery

    # name of nodes start # here have single node celeryd_nodes="w1" # or have 3 nodes: #celeryd_nodes="w1 w2 w3"  # absolute path "manage.py" celery_bin="/var/www/engine/manage.py"  # how call manage.py celeryd_multi="celery multi"  # command-line arguments worker celeryd_opts="--time-limit=300 --concurrency=2"  # %n replaced first part of nodename. celeryd_log_file="/var/log/celery/%n.log" celeryd_pid_file="/var/run/celery/%n.pid"  # workers should run unprivileged user. celeryd_user="root" celeryd_group="root" 

/etc/init.d/celeryd
got https://github.com/celery/celery/blob/3.1/extra/generic-init.d/celeryd without changes

now, when go console , run: cd /etc/init.d celery multi start w1

i see output:

celery multi v3.1.11 (cipater) > starting nodes...         > w1@engine: ok 

so, no errors! tasks not invoked , cannot figure out whats wrong.

i suggest use supervisor. it's better way init scripts, because can run multiple celery instances different projects on 1 server. example config supervisor can find in celery repo or working example project:

# /etc/supervisor/conf.d/celery.conf [program:celery] command=/home/newspos/.virtualenvs/newspos/bin/celery worker -a newspos --loglevel=info user=newspos environment=django_settings_module="newspos.settings" directory=/home/newspos/projects/newspos/ autostart=true autorestart=true stopwaitsecs = 600 killasgroup=true startsecs=10 stdout_logfile=/var/log/celery/newspos-celeryd.log stderr_logfile=/var/log/celery/newspos-celeryd.log 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -