Browse Source

celeryd-multi: abbreviations: %n is now "name", %h is "hostname"

Ask Solem 15 years ago
parent
commit
0409fb4375
2 changed files with 5 additions and 5 deletions
  1. 2 2
      celery/bin/celeryd_multi.py
  2. 3 3
      contrib/debian/init.d/celeryd-multi

+ 2 - 2
celery/bin/celeryd_multi.py

@@ -121,8 +121,8 @@ def multi_args(p, cmd="celeryd", prefix="", suffix=""):
 
     for name in names:
         this_name = options["-n"] = prefix + name + suffix
-        expand = abbreviations({"%n": this_name,
-                                "%p": prefix + name})
+        expand = abbreviations({"%h": this_name,
+                                "%n": name})
         line = expand(cmd) + " " + " ".join(
                 format_opt(opt, expand(value))
                     for opt, value in p.optmerge(name, options).items())

+ 3 - 3
contrib/debian/init.d/celeryd-multi

@@ -26,13 +26,13 @@
 
 set -e
 
-CELERYD_PID_FILE="/var/run/celeryd-%p.pid"
-CELERYD_LOG_FILE="/var/log/celeryd-%p.log"
+CELERYD_PID_FILE="/var/run/celeryd-%n.pid"
+CELERYD_LOG_FILE="/var/log/celeryd-%n.log"
 CELERYD_LOG_LEVEL="INFO"
 CELERYD_NUM_WORKERS=2
 DEFAULT_CELERYD="celeryd"
 
-# /etc/init.d/ssh: start and stop the celery task worker daemon.
+# /etc/init.d/celeryd-multi start and stop the celery task worker daemon.
 
 if test -f /etc/default/celeryd; then
     . /etc/default/celeryd