Skip to content

Commit

Permalink
Can now configure CELERYCTL envvar in /etc/default/celeryd.
Browse files Browse the repository at this point in the history
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 celery#552
  • Loading branch information
jude authored and ask committed Nov 28, 2011
1 parent 4de06d7 commit d853586
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion contrib/generic-init.d/celeryd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -125,7 +126,7 @@ case "$1" in
;;

status)
celeryctl status
$CELERYCTL status
;;

restart)
Expand Down
12 changes: 11 additions & 1 deletion docs/cookbook/daemonizing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit d853586

Please sign in to comment.