Browse Source

added kill, status, and updated check_parths
Conflicts:
extra/generic-init.d/celeryd

whendrik 11 years ago
parent
commit
6fed92fdf6
1 changed files with 15 additions and 6 deletions
  1. 15 6
      extra/generic-init.d/celeryd

+ 15 - 6
extra/generic-init.d/celeryd

@@ -180,11 +180,6 @@ _get_worker_pids() {
 }
 
 
-stop_workers () {
-    $CELERYD_MULTI stopwait $CELERYD_NODES --pidfile="$CELERYD_PID_FILE"
-}
-
-
 start_workers () {
     $CELERYD_MULTI start $CELERYD_NODES $DAEMON_OPTS        \
                          --pidfile="$CELERYD_PID_FILE"      \
@@ -195,6 +190,11 @@ start_workers () {
 }
 
 
+stop_workers () {
+    $CELERYD_MULTI stopwait $CELERYD_NODES --pidfile="$CELERYD_PID_FILE"
+}
+
+
 restart_workers () {
     $CELERYD_MULTI restart $CELERYD_NODES $DAEMON_OPTS      \
                            --pidfile="$CELERYD_PID_FILE"    \
@@ -204,6 +204,12 @@ restart_workers () {
                            $CELERYD_OPTS
 }
 
+
+kill_workers() {
+    $CELERYD_MULTI kill $CELERYD_NODES --pidfile="$CELERYD_PID_FILE"
+}
+
+
 restart_workers_graceful () {
     local worker_pids=
     worker_pids=`_get_worker_pids`
@@ -277,7 +283,10 @@ case "$1" in
         check_paths
         restart_workers
     ;;
-
+    kill)
+        check_dev_null
+        kill_workers
+    ;;
     restart-workers-graceful)
         check_dev_null
         restart_workers_graceful