Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Based on the above answer, I formulated the following /etc/default/celeryd file (originally based on the configuration described in the docs here: <a href="http://ask.github.com/celery/cookbook/daemonizing.html" rel="noreferrer">http://ask.github.com/celery/cookbook/daemonizing.html</a>) which works for running two celery workers on the same machine, each worker servicing a different queue (in this case the queue names are "default" and "important"). </p> <p>Basically this answer is just an extension of the previous answer in that it simply shows how to do the same thing, but for celery in daemon mode. Please note that we are using django-celery here:</p> <pre><code>CELERYD_NODES="w1 w2" # Where to chdir at start. CELERYD_CHDIR="/home/peedee/projects/myproject/myproject" # Python interpreter from environment. #ENV_PYTHON="$CELERYD_CHDIR/env/bin/python" ENV_PYTHON="/home/peedee/projects/myproject/myproject-env/bin/python" # How to call "manage.py celeryd_multi" CELERYD_MULTI="$ENV_PYTHON $CELERYD_CHDIR/manage.py celeryd_multi" # How to call "manage.py celeryctl" CELERYCTL="$ENV_PYTHON $CELERYD_CHDIR/manage.py celeryctl" # Extra arguments to celeryd # Longest task: 10 hrs (as of writing this, the UpdateQuanitites task takes 5.5 hrs) CELERYD_OPTS="-Q:w1 default -c:w1 2 -Q:w2 important -c:w2 2 --time-limit=36000 -E" # Name of the celery config module. CELERY_CONFIG_MODULE="celeryconfig" # %n will be replaced with the nodename. CELERYD_LOG_FILE="/var/log/celery/celeryd.log" CELERYD_PID_FILE="/var/run/celery/%n.pid" # Name of the projects settings module. export DJANGO_SETTINGS_MODULE="settings" # celerycam configuration CELERYEV_CAM="djcelery.snapshot.Camera" CELERYEV="$ENV_PYTHON $CELERYD_CHDIR/manage.py celerycam" CELERYEV_LOG_FILE="/var/log/celery/celerycam.log" # Where to chdir at start. CELERYBEAT_CHDIR="/home/peedee/projects/cottonon/cottonon" # Path to celerybeat CELERYBEAT="$ENV_PYTHON $CELERYBEAT_CHDIR/manage.py celerybeat" # Extra arguments to celerybeat. This is a file that will get # created for scheduled tasks. It's generated automatically # when Celerybeat starts. CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule" # Log level. Can be one of DEBUG, INFO, WARNING, ERROR or CRITICAL. CELERYBEAT_LOG_LEVEL="INFO" # Log file locations CELERYBEAT_LOGFILE="/var/log/celerybeat.log" CELERYBEAT_PIDFILE="/var/run/celerybeat.pid" </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload