Browse Source

Renames celery.bin.celeryd_multi -> celery.bin.multi

Ask Solem 12 years ago
parent
commit
d5536e0aaf

+ 1 - 1
celery/__main__.py

@@ -38,7 +38,7 @@ def _compat_worker():
 def _compat_multi():
     maybe_patch_concurrency()
     _warn_deprecated('celery multi')
-    from celery.bin.celeryd_multi import main
+    from celery.bin.multi import main
     main()
 
 

+ 1 - 1
celery/bin/celery.py

@@ -261,7 +261,7 @@ class multi(Command):
         return ()
 
     def run_from_argv(self, prog_name, argv):
-        from celery.bin.celeryd_multi import MultiTool
+        from celery.bin.multi import MultiTool
         return MultiTool().execute_from_commandline(argv, prog_name)
 
 

+ 0 - 0
celery/bin/celeryd_multi.py → celery/bin/multi.py


+ 6 - 6
celery/tests/bin/test_celeryd_multi.py → celery/tests/bin/test_multi.py

@@ -6,7 +6,7 @@ import sys
 
 from mock import Mock, patch
 
-from celery.bin.celeryd_multi import (
+from celery.bin.multi import (
     main,
     MultiTool,
     findsig,
@@ -187,7 +187,7 @@ class test_MultiTool(Case):
 
         self.assertEqual(self.t.retcode, 1)
 
-    @patch('celery.bin.celeryd_multi.Popen')
+    @patch('celery.bin.multi.Popen')
     def test_waitexec(self, Popen):
         self.t.note = Mock()
         pipe = Popen.return_value = Mock()
@@ -287,7 +287,7 @@ class test_MultiTool(Case):
                     raise ValueError()
         Pidfile.side_effect = pids
 
-    @patch('celery.bin.celeryd_multi.Pidfile')
+    @patch('celery.bin.multi.Pidfile')
     @patch('socket.gethostname')
     def test_getpids(self, gethostname, Pidfile):
         gethostname.return_value = 'e.com'
@@ -320,9 +320,9 @@ class test_MultiTool(Case):
         # without callback, should work
         nodes = self.t.getpids(p, 'celery worker', callback=None)
 
-    @patch('celery.bin.celeryd_multi.Pidfile')
+    @patch('celery.bin.multi.Pidfile')
     @patch('socket.gethostname')
-    @patch('celery.bin.celeryd_multi.sleep')
+    @patch('celery.bin.multi.sleep')
     def test_shutdown_nodes(self, slepp, gethostname, Pidfile):
         gethostname.return_value = 'e.com'
         self.prepare_pidfile_for_getpids(Pidfile)
@@ -441,7 +441,7 @@ class test_MultiTool(Case):
         self.t.stopwait(['foo', 'bar', 'baz'], 'celeryd')
         self.assertEqual(self.t._stop_nodes.call_args[1]['retry'], 2)
 
-    @patch('celery.bin.celeryd_multi.MultiTool')
+    @patch('celery.bin.multi.MultiTool')
     def test_main(self, MultiTool):
         m = MultiTool.return_value = Mock()
         with self.assertRaises(SystemExit):

+ 5 - 5
docs/getting-started/next-steps.rst

@@ -78,7 +78,7 @@ The :program:`celery` program can be used to start the worker:
 
 When the worker starts you should see a banner and some messages::
 
-     -------------- celery@halcyon.local v3.0 (Chiastic Slide)
+     -------------- celery@halcyon.local v3.1 (Cipater)
      ---- **** -----
      --- * ***  * -- [Configuration]
      -- * - **** --- . broker:      amqp://guest@localhost:5672//
@@ -152,7 +152,7 @@ start one or more workers in the background:
 .. code-block:: bash
 
     $ celery multi start w1 -A proj -l info
-    celeryd-multi v3.0.0 (Chiastic Slide)
+    celery multi v3.1.0 (Cipater)
     > Starting nodes...
         > w1.halcyon.local: OK
 
@@ -161,13 +161,13 @@ You can restart it too:
 .. code-block:: bash
 
     $ celery multi restart w1 -A proj -l info
-    celeryd-multi v3.0.0 (Chiastic Slide)
+    celery multi v3.1.0 (Cipater)
     > Stopping nodes...
         > w1.halcyon.local: TERM -> 64024
     > Waiting for 1 node.....
         > w1.halcyon.local: OK
     > Restarting node w1.halcyon.local: OK
-    celeryd-multi v3.0.0 (Chiastic Slide)
+    celeryd multi v3.1.0 (Cipater)
     > Stopping nodes...
         > w1.halcyon.local: TERM -> 64052
 
@@ -212,7 +212,7 @@ e.g:
     $ celeryd multi start 10 -A proj -l info -Q:1-3 images,video -Q:4,5 data \
         -Q default -L:4,5 debug
 
-For more examples see the :mod:`~celery.bin.celeryd_multi` module in the API
+For more examples see the :mod:`~celery.bin.multi` module in the API
 reference.
 
 .. _app-argument:

+ 1 - 1
docs/history/changelog-2.0.rst

@@ -938,7 +938,7 @@ News
 
 * celeryd: New option `--version`: Dump version info and exit.
 
-* :mod:`celeryd-multi <celeryd.bin.celeryd_multi>`: Tool for shell scripts
+* :mod:`celeryd-multi <celeryd.bin.multi>`: Tool for shell scripts
   to start multiple workers.
 
     Some examples:

+ 3 - 3
docs/reference/celery.bin.celeryd_multi.rst → docs/reference/celery.bin.multi.rst

@@ -1,11 +1,11 @@
 ===============================================
- celery.bin.celeryd_multi
+ celery.bin.multi
 ===============================================
 
 .. contents::
     :local:
-.. currentmodule:: celery.bin.celeryd_multi
+.. currentmodule:: celery.bin.multi
 
-.. automodule:: celery.bin.celeryd_multi
+.. automodule:: celery.bin.multi
     :members:
     :undoc-members:

+ 1 - 1
docs/reference/index.rst

@@ -51,4 +51,4 @@
     celery.bin.events
     celery.bin.celery
     celery.bin.amqp
-    celery.bin.celeryd_multi
+    celery.bin.multi

+ 3 - 9
extra/centos/celeryd.sysconfig

@@ -11,16 +11,8 @@
 # Path to celery - which might be in a virtualenv
 #CELERY="$BIN_PATH/bin/celery"
 
-# Path to the celeryd multi (might be in a virtualenv)
-#CELERYD_MULTI="$BIN_PATH/bin/celeryd-multi"
-
 # Passed into celeryd multi
-#CELERYD="-m celery.bin.celeryd_detach"
-# OR add -b option is set to your broker URL as necessary
-#CELERYD="-m celery.bin.celeryd_detach -b $amqp_url"
-
-# How to call "manage.py celeryctl"
-#CELERYCTL="$ENV_PYTHON $CELERYD_CHDIR/manage.py celeryctl"
+#CELERYD="-m celery worker --detach"
 
 # Log and PID files
 #CELERYD_LOG_FILE="/path/to/var/log/celeryd/app_name-celeryworker.log"
@@ -38,6 +30,8 @@
 
 # Default arguments to be passed into celeryd.
 #CELERYD_OPTS=""
+# e.g. add app option:
+#CELERYD="-A proj.tasks:app"
 
 # Set the task modules that you want to have celery load
 #CELERY_IMPORTS=("tasks", )