Browse Source

Support of missing CELERY_BIN and CELERY_APP, described in http://celery.readthedocs.org/en/latest/tutorials/daemonizing.html#id11

ffeast 11 years ago
parent
commit
04a12eb1ff
2 changed files with 7 additions and 5 deletions
  1. 2 1
      extra/centos/celeryd
  2. 5 4
      extra/centos/celeryd.sysconfig

+ 2 - 1
extra/centos/celeryd

@@ -71,7 +71,7 @@ if [ -z "$CELERYD_LOG_FILE" ]; then
 fi
 
 CELERYD_LOG_LEVEL=${CELERYD_LOG_LEVEL:-${CELERYD_LOGLEVEL:-$DEFAULT_LOG_LEVEL}}
-CELERYD_MULTI=${CELERYD_MULTI:-"celeryd-multi"}
+CELERYD_MULTI=${CELERYD_MULTI:-"${CELERY_BIN} multi"}
 CELERYD=${CELERYD:-$DEFAULT_CELERYD}
 CELERYD_NODES=${CELERYD_NODES:-$DEFAULT_NODES}
 
@@ -85,6 +85,7 @@ fi
 
 CELERYD_LOG_DIR=`dirname $CELERYD_LOG_FILE`
 CELERYD_PID_DIR=`dirname $CELERYD_PID_FILE`
+CELERYD_OPTS=${CELERYD_OPTS:-"--app=$CELERY_APP"}
 
 # Extra start-stop-daemon options, like user/group.
 if [ -n "$CELERYD_USER" ]; then

+ 5 - 4
extra/centos/celeryd.sysconfig

@@ -1,4 +1,5 @@
 # In CentOS, contents should be placed in the file /etc/sysconfig/celeryd
+# Available options: http://celery.readthedocs.org/en/latest/tutorials/daemonizing.html#available-options
 
 # Names of nodes to start (space-separated)
 #CELERYD_NODES="my_application-node_1"
@@ -6,11 +7,11 @@
 # Where to chdir at start. This could be the root of a virtualenv.
 #CELERYD_CHDIR="/path/to/my_application"
 
-# How to call celeryd-multi
-#CELERYD_MULTI="$CELERYD_CHDIR/bin/celeryd-multi"
+# Absolute or relative path to the celery program
+#CELERY_BIN="/usr/local/bin/celery"
 
-# Extra arguments
-#CELERYD_OPTS="--app=my_application.path.to.worker --time-limit=300 --concurrency=8 --loglevel=DEBUG"
+# App instance to use (value for --app argument).
+#CELERY_APP="my_application"
 
 # Create log/pid dirs, if they don't already exist
 #CELERY_CREATE_DIRS=1