浏览代码

Use command-line instead of 'command line'

Ask Solem 12 年之前
父节点
当前提交
04bf28ff8a

+ 6 - 6
celery/bin/base.py

@@ -80,7 +80,7 @@ for warning in (CDeprecationWarning, CPendingDeprecationWarning):
     warnings.simplefilter('once', warning, 0)
     warnings.simplefilter('once', warning, 0)
 
 
 ARGV_DISABLED = """
 ARGV_DISABLED = """
-Unrecognized command line arguments: {0}
+Unrecognized command-line arguments: {0}
 
 
 Try --help?
 Try --help?
 """
 """
@@ -103,7 +103,7 @@ class HelpFormatter(IndentedHelpFormatter):
 
 
 
 
 class Command(object):
 class Command(object):
-    """Base class for command line applications.
+    """Base class for command-line applications.
 
 
     :keyword app: The current app.
     :keyword app: The current app.
     :keyword get_app: Callable returning the current app if no app provided.
     :keyword get_app: Callable returning the current app if no app provided.
@@ -163,9 +163,9 @@ class Command(object):
         raise NotImplementedError('subclass responsibility')
         raise NotImplementedError('subclass responsibility')
 
 
     def execute_from_commandline(self, argv=None):
     def execute_from_commandline(self, argv=None):
-        """Execute application from command line.
+        """Execute application from command-line.
 
 
-        :keyword argv: The list of command line arguments.
+        :keyword argv: The list of command-line arguments.
                        Defaults to ``sys.argv``.
                        Defaults to ``sys.argv``.
 
 
         """
         """
@@ -199,7 +199,7 @@ class Command(object):
         return '%%prog [options] {0.args}'.format(self)
         return '%%prog [options] {0.args}'.format(self)
 
 
     def get_options(self):
     def get_options(self):
-        """Get supported command line options."""
+        """Get supported command-line options."""
         return self.option_list
         return self.option_list
 
 
     def expanduser(self, value):
     def expanduser(self, value):
@@ -208,7 +208,7 @@ class Command(object):
         return value
         return value
 
 
     def handle_argv(self, prog_name, argv):
     def handle_argv(self, prog_name, argv):
-        """Parses command line arguments from ``argv`` and dispatches
+        """Parses command-line arguments from ``argv`` and dispatches
         to :meth:`run`.
         to :meth:`run`.
 
 
         :param prog_name: The program name (``argv[0]``).
         :param prog_name: The program name (``argv[0]``).

+ 1 - 1
celery/loaders/base.py

@@ -159,7 +159,7 @@ class BaseLoader(object):
 
 
         def getarg(arg):
         def getarg(arg):
             """Parse a single configuration definition from
             """Parse a single configuration definition from
-            the command line."""
+            the command-line."""
 
 
             ## find key/value
             ## find key/value
             # ns.key=value|ns_key=value (case insensitive)
             # ns.key=value|ns_key=value (case insensitive)

+ 2 - 2
celery/worker/autoscale.py

@@ -7,8 +7,8 @@
     for growing and shrinking the pool according to the
     for growing and shrinking the pool according to the
     current autoscale settings.
     current autoscale settings.
 
 
-    The autoscale thread is only enabled if autoscale
-    has been enabled on the command line.
+    The autoscale thread is only enabled if :option:`--autoscale`
+    has been enabled on the command-line.
 
 
 """
 """
 from __future__ import absolute_import
 from __future__ import absolute_import

+ 1 - 1
docs/Makefile

@@ -1,7 +1,7 @@
 # Makefile for Sphinx documentation
 # Makefile for Sphinx documentation
 #
 #
 
 
-# You can set these variables from the command line.
+# You can set these variables from the command-line.
 SPHINXOPTS    =
 SPHINXOPTS    =
 SPHINXBUILD   = sphinx-build
 SPHINXBUILD   = sphinx-build
 PAPER         =
 PAPER         =

+ 1 - 1
docs/django/first-steps-with-django.rst

@@ -113,7 +113,7 @@ development it is useful to be able to start a worker instance by using the
 
 
     $ python manage.py celery worker --loglevel=info
     $ python manage.py celery worker --loglevel=info
 
 
-For a complete listing of the command line options available,
+For a complete listing of the command-line options available,
 use the help command:
 use the help command:
 
 
 .. code-block:: bash
 .. code-block:: bash

+ 1 - 1
docs/getting-started/first-steps-with-celery.rst

@@ -170,7 +170,7 @@ background as a daemon.  To do this you need to use the tools provided
 by your platform, or something like `supervisord`_ (see :ref:`daemonizing`
 by your platform, or something like `supervisord`_ (see :ref:`daemonizing`
 for more information).
 for more information).
 
 
-For a complete listing of the command line options available, do:
+For a complete listing of the command-line options available, do:
 
 
 .. code-block:: bash
 .. code-block:: bash
 
 

+ 14 - 6
docs/getting-started/next-steps.rst

@@ -93,7 +93,7 @@ When the worker starts you should see a banner and some messages::
      [2012-06-08 16:23:51,078: WARNING/MainProcess] celery@halcyon.local has started.
      [2012-06-08 16:23:51,078: WARNING/MainProcess] celery@halcyon.local has started.
 
 
 -- The *broker* is the URL you specifed in the broker argument in our ``celery``
 -- The *broker* is the URL you specifed in the broker argument in our ``celery``
-module, you can also specify a different broker on the command line by using
+module, you can also specify a different broker on the command-line by using
 the :option:`-b` option.
 the :option:`-b` option.
 
 
 -- *Concurrency* is the number of multiprocessing worker process used
 -- *Concurrency* is the number of multiprocessing worker process used
@@ -125,7 +125,7 @@ as a means for Quality of Service, separation of concerns,
 and emulating priorities, all described in the :ref:`Routing Guide
 and emulating priorities, all described in the :ref:`Routing Guide
 <guide-routing>`.
 <guide-routing>`.
 
 
-You can get a complete list of command line arguments
+You can get a complete list of command-line arguments
 by passing in the `--help` flag:
 by passing in the `--help` flag:
 
 
 .. code-block:: bash
 .. code-block:: bash
@@ -177,12 +177,20 @@ or stop it:
 
 
     $ celery multi stop -w1 -A proj -l info
     $ celery multi stop -w1 -A proj -l info
 
 
+The ``stop`` command is asynchronous so it will not wait for the
+worker to shutdown.  You will probably want to use the ``stopwait`` command
+instead which will ensure all currently executing tasks is completed:
+
+.. code-block:: bash
+
+    $ celery multi stopwait -w1 -A proj -l info
+
 .. note::
 .. note::
 
 
     :program:`celery multi` doesn't store information about workers
     :program:`celery multi` doesn't store information about workers
-    so you need to use the same command line parameters when restarting.
-    Also the same pidfile and logfile arguments must be used when
-    stopping/killing.
+    so you need to use the same command-line arguments when
+    restarting.  Only the same pidfile and logfile arguments must be
+    used when stopping.
 
 
 By default it will create pid and log files in the current directory,
 By default it will create pid and log files in the current directory,
 to protect against multiple workers launching on top of each other
 to protect against multiple workers launching on top of each other
@@ -196,7 +204,7 @@ you are encouraged to put these in a dedicated directory:
                                             --logfile=/var/log/celery/%n.pid
                                             --logfile=/var/log/celery/%n.pid
 
 
 With the multi command you can start multiple workers, and there is a powerful
 With the multi command you can start multiple workers, and there is a powerful
-command line syntax to specify arguments for different workers too,
+command-line syntax to specify arguments for different workers too,
 e.g:
 e.g:
 
 
 .. code-block:: bash
 .. code-block:: bash

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

@@ -522,7 +522,7 @@ Fixes
         >>> result.get()
         >>> result.get()
         'pong'
         'pong'
 
 
-* `camqadm`: This is a new utility for command line access to the AMQP API.
+* `camqadm`: This is a new utility for command-line access to the AMQP API.
 
 
     Excellent for deleting queues/bindings/exchanges, experimentation and
     Excellent for deleting queues/bindings/exchanges, experimentation and
     testing:
     testing:

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

@@ -766,7 +766,7 @@ News
         exception will be raised when this is exceeded.  The task can catch
         exception will be raised when this is exceeded.  The task can catch
         this to e.g. clean up before the hard time limit comes.
         this to e.g. clean up before the hard time limit comes.
 
 
-    New command line arguments to celeryd added:
+    New command-line arguments to celeryd added:
     `--time-limit` and `--soft-time-limit`.
     `--time-limit` and `--soft-time-limit`.
 
 
     What's left?
     What's left?

+ 3 - 3
docs/history/changelog-2.1.rst

@@ -147,13 +147,13 @@ Fixes
 * :program:`celeryd-multi`: Fixed `set changed size during iteration` bug
 * :program:`celeryd-multi`: Fixed `set changed size during iteration` bug
     occurring in the restart command.
     occurring in the restart command.
 
 
-* celeryd: Accidentally tried to use additional command line arguments.
+* celeryd: Accidentally tried to use additional command-line arguments.
 
 
    This would lead to an error like:
    This would lead to an error like:
 
 
     `got multiple values for keyword argument 'concurrency'`.
     `got multiple values for keyword argument 'concurrency'`.
 
 
-    Additional command line arguments are now ignored, and does not
+    Additional command-line arguments are now ignored, and does not
     produce this error.  However -- we do reserve the right to use
     produce this error.  However -- we do reserve the right to use
     positional arguments in the future, so please do not depend on this
     positional arguments in the future, so please do not depend on this
     behavior.
     behavior.
@@ -360,7 +360,7 @@ News
     There's also a Debian init.d script for :mod:`~celery.bin.celeryev` available,
     There's also a Debian init.d script for :mod:`~celery.bin.celeryev` available,
     see :ref:`daemonizing` for more information.
     see :ref:`daemonizing` for more information.
 
 
-    New command line arguments to celeryev:
+    New command-line arguments to celeryev:
 
 
         * :option:`-c|--camera`: Snapshot camera class to use.
         * :option:`-c|--camera`: Snapshot camera class to use.
         * :option:`--logfile|-f`: Log file
         * :option:`--logfile|-f`: Log file

+ 3 - 3
docs/history/changelog-2.2.rst

@@ -233,7 +233,7 @@ Fixes
 * celerybeat:  PersistentScheduler now automatically removes a corrupted
 * celerybeat:  PersistentScheduler now automatically removes a corrupted
   schedule file (Issue #346).
   schedule file (Issue #346).
 
 
-* Programs that doesn't support positional command line arguments now provides
+* Programs that doesn't support positional command-line arguments now provides
   a user friendly error message.
   a user friendly error message.
 
 
 * Programs no longer tries to load the configuration file when showing
 * Programs no longer tries to load the configuration file when showing
@@ -708,7 +708,7 @@ Important Notes
             $ camqadm exchange.delete celeryevent
             $ camqadm exchange.delete celeryevent
 
 
 * `celeryd` now starts without configuration, and configuration can be
 * `celeryd` now starts without configuration, and configuration can be
-  specified directly on the command line.
+  specified directly on the command-line.
 
 
   Configuration options must appear after the last argument, separated
   Configuration options must appear after the last argument, separated
   by two dashes:
   by two dashes:
@@ -912,7 +912,7 @@ News
    scheduled tasks.
    scheduled tasks.
 
 
 * The configuration module and loader to use can now be specified on
 * The configuration module and loader to use can now be specified on
-  the command line.
+  the command-line.
 
 
     For example:
     For example:
 
 

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

@@ -203,7 +203,7 @@ Important Notes
     then the value from the configuration will be used as default.
     then the value from the configuration will be used as default.
 
 
     Also, programs now support the :option:`-b|--broker` option to specify
     Also, programs now support the :option:`-b|--broker` option to specify
-    a broker URL on the command line:
+    a broker URL on the command-line:
 
 
     .. code-block:: bash
     .. code-block:: bash
 
 

+ 2 - 2
docs/history/changelog-2.5.rst

@@ -133,10 +133,10 @@ Fixes
 
 
     Fix contributed by Martin Melin.
     Fix contributed by Martin Melin.
 
 
-- celeryctl can now be configured on the command line.
+- celeryctl can now be configured on the command-line.
 
 
     Like with celeryd it is now possible to configure celery settings
     Like with celeryd it is now possible to configure celery settings
-    on the command line for celeryctl:
+    on the command-line for celeryctl:
 
 
     .. code-block:: bash
     .. code-block:: bash
 
 

+ 2 - 1
docs/internals/guide.rst

@@ -260,9 +260,10 @@ Module Overview
 - celery.apps
 - celery.apps
 
 
     Major user applications: ``celeryd``, and ``celerybeat``
     Major user applications: ``celeryd``, and ``celerybeat``
+
 - celery.bin
 - celery.bin
 
 
-    Command line applications.
+    Command-line applications.
     setup.py creates setuptools entrypoints for these.
     setup.py creates setuptools entrypoints for these.
 
 
 - celery.concurrency
 - celery.concurrency

+ 1 - 1
docs/userguide/monitoring.rst

@@ -406,7 +406,7 @@ to be able to log into the admin later)::
 Now that the service is started you can visit the monitor
 Now that the service is started you can visit the monitor
 at http://127.0.0.1:8000, and log in using the user you created.
 at http://127.0.0.1:8000, and log in using the user you created.
 
 
-For a list of the command line options supported by :program:`djcelerymon`,
+For a list of the command-line options supported by :program:`djcelerymon`,
 please see ``djcelerymon --help``.
 please see ``djcelerymon --help``.
 
 
 .. _monitoring-celeryev:
 .. _monitoring-celeryev:

+ 1 - 1
docs/userguide/periodic-tasks.rst

@@ -254,7 +254,7 @@ location for this file:
 Using custom scheduler classes
 Using custom scheduler classes
 ------------------------------
 ------------------------------
 
 
-Custom scheduler classes can be specified on the command line (the `-S`
+Custom scheduler classes can be specified on the command-line (the `-S`
 argument).  The default scheduler is :class:`celery.beat.PersistentScheduler`,
 argument).  The default scheduler is :class:`celery.beat.PersistentScheduler`,
 which is simply keeping track of the last run times in a local database file
 which is simply keeping track of the last run times in a local database file
 (a :mod:`shelve`).
 (a :mod:`shelve`).

+ 2 - 2
docs/userguide/workers.rst

@@ -25,7 +25,7 @@ You can start the worker in the foreground by executing the command:
 
 
     $ celery worker --app=app -l info
     $ celery worker --app=app -l info
 
 
-For a full list of available command line options see
+For a full list of available command-line options see
 :mod:`~celery.bin.celeryd`, or simply do:
 :mod:`~celery.bin.celeryd`, or simply do:
 
 
 .. code-block:: bash
 .. code-block:: bash
@@ -153,7 +153,7 @@ Remote control
 .. sidebar:: The ``celery`` command
 .. sidebar:: The ``celery`` command
 
 
     The :program:`celery` program is used to execute remote control
     The :program:`celery` program is used to execute remote control
-    commands from the command line.  It supports all of the commands
+    commands from the command-line.  It supports all of the commands
     listed below.  See :ref:`monitoring-celeryctl` for more information.
     listed below.  See :ref:`monitoring-celeryctl` for more information.
 
 
 pool support: *processes, eventlet, gevent*, blocking:*threads/solo* (see note)
 pool support: *processes, eventlet, gevent*, blocking:*threads/solo* (see note)

+ 2 - 2
docs/whatsnew-2.5.rst

@@ -374,7 +374,7 @@ In Other News
 
 
     Contributed by Daniel Hepper.
     Contributed by Daniel Hepper.
 
 
-- celerybeat can now be configured on the command line like celeryd.
+- celerybeat can now be configured on the command-line like celeryd.
 
 
   Additional configuration must be added at the end of the argument list
   Additional configuration must be added at the end of the argument list
   followed by ``--``, for example:
   followed by ``--``, for example:
@@ -473,7 +473,7 @@ In Other News
 
 
     Contributed by Chris Streeter.
     Contributed by Chris Streeter.
 
 
-- User (tilde) is now expanded in command line arguments.
+- User (tilde) is now expanded in command-line arguments.
 
 
 - Can now configure CELERYCTL envvar in :file:`/etc/default/celeryd`.
 - Can now configure CELERYCTL envvar in :file:`/etc/default/celeryd`.
 
 

+ 2 - 2
docs/whatsnew-3.0.rst

@@ -50,7 +50,7 @@ Highlights
 
 
         Read more in the :ref:`Canvas <guide-canvas>` user guide.
         Read more in the :ref:`Canvas <guide-canvas>` user guide.
 
 
-    - All of Celery's command line programs are now available from a single
+    - All of Celery's command-line programs are now available from a single
       :program:`celery` umbrella command.
       :program:`celery` umbrella command.
 
 
     - This is the last version to support Python 2.5.
     - This is the last version to support Python 2.5.
@@ -122,7 +122,7 @@ by default if the eventloop is not used.
 New ``celery`` umbrella command
 New ``celery`` umbrella command
 -------------------------------
 -------------------------------
 
 
-All Celery's command line programs are now available from a single
+All Celery's command-line programs are now available from a single
 :program:`celery` umbrella command.
 :program:`celery` umbrella command.
 
 
 You can see a list of subcommands and options by running:
 You can see a list of subcommands and options by running: