Browse Source

Can now configure CELERYCTL envvar in /etc/default/celeryd.

While not necessary for operation, celeryctl is used for the
`celeryd status` command, and the path to celeryctl must be configured
for that to work.  The daemonization cookbook contains examples.

Closes #552
Jude Nagurney 13 years ago
parent
commit
7e0b12fe10
2 changed files with 13 additions and 2 deletions
  1. 2 1
      contrib/generic-init.d/celeryd
  2. 11 1
      docs/cookbook/daemonizing.rst

+ 2 - 1
contrib/generic-init.d/celeryd

@@ -40,6 +40,7 @@ CELERYD_LOG_FILE=${CELERYD_LOG_FILE:-${CELERYD_LOGFILE:-$DEFAULT_LOG_FILE}}
 CELERYD_LOG_LEVEL=${CELERYD_LOG_LEVEL:-${CELERYD_LOGLEVEL:-$DEFAULT_LOG_LEVEL}}
 CELERYD_MULTI=${CELERYD_MULTI:-"celeryd-multi"}
 CELERYD=${CELERYD:-$DEFAULT_CELERYD}
+CELERYCTL=${CELERYCTL:="celeryctl"}
 CELERYD_NODES=${CELERYD_NODES:-$DEFAULT_NODES}
 
 export CELERY_LOADER
@@ -125,7 +126,7 @@ case "$1" in
     ;;
 
     status)
-        celeryctl status
+        $CELERYCTL status
     ;;
 
     restart)

+ 11 - 1
docs/cookbook/daemonizing.rst

@@ -85,6 +85,9 @@ This is an example configuration for those using `django-celery`::
     # How to call "manage.py celeryd_multi"
     CELERYD_MULTI="$CELERYD_CHDIR/manage.py celeryd_multi"
 
+    # How to call "manage.py celeryctl"
+    CELERYCTL="$CELERYD_CHDIR/manage.py celeryctl"
+
     # Extra arguments to celeryd
     CELERYD_OPTS="--time-limit=300 --concurrency=8"
 
@@ -123,6 +126,9 @@ environment's python interpreter::
     
     # 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
     CELERYD_OPTS="--time-limit=300 --concurrency=8"
@@ -167,7 +173,11 @@ Available options
 
 * CELERYD_MULTI
     Path to the celeryd-multi program. Default is `celeryd-multi`.
-    You can point this to an virtualenv, or even use manage.py for django.
+    You can point this to a virtualenv, or even use manage.py for django.
+
+* CELERYCTL
+    Path to the celeryctl program.  Default is `celeryctl`.
+    You can point this to a virtualenv, or even use manage.py for django.
 
 * CELERYD_USER
     User to run celeryd as. Default is current user.