Browse Source

Use command-line instead of 'command line'

Ask Solem 12 years ago
parent
commit
04bf28ff8a

+ 6 - 6
celery/bin/base.py

@@ -80,7 +80,7 @@ for warning in (CDeprecationWarning, CPendingDeprecationWarning):
     warnings.simplefilter('once', warning, 0)
 
 ARGV_DISABLED = """
-Unrecognized command line arguments: {0}
+Unrecognized command-line arguments: {0}
 
 Try --help?
 """
@@ -103,7 +103,7 @@ class HelpFormatter(IndentedHelpFormatter):
 
 
 class Command(object):
-    """Base class for command line applications.
+    """Base class for command-line applications.
 
     :keyword app: The current app.
     :keyword get_app: Callable returning the current app if no app provided.
@@ -163,9 +163,9 @@ class Command(object):
         raise NotImplementedError('subclass responsibility')
 
     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``.
 
         """
@@ -199,7 +199,7 @@ class Command(object):
         return '%%prog [options] {0.args}'.format(self)
 
     def get_options(self):
-        """Get supported command line options."""
+        """Get supported command-line options."""
         return self.option_list
 
     def expanduser(self, value):
@@ -208,7 +208,7 @@ class Command(object):
         return value
 
     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`.
 
         :param prog_name: The program name (``argv[0]``).

+ 1 - 1
celery/loaders/base.py

@@ -159,7 +159,7 @@ class BaseLoader(object):
 
         def getarg(arg):
             """Parse a single configuration definition from
-            the command line."""
+            the command-line."""
 
             ## find key/value
             # 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
     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

+ 1 - 1
docs/Makefile

@@ -1,7 +1,7 @@
 # Makefile for Sphinx documentation
 #
 
-# You can set these variables from the command line.
+# You can set these variables from the command-line.
 SPHINXOPTS    =
 SPHINXBUILD   = sphinx-build
 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
 
-For a complete listing of the command line options available,
+For a complete listing of the command-line options available,
 use the help command:
 
 .. 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`
 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
 

+ 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.
 
 -- 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.
 
 -- *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
 <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:
 
 .. code-block:: bash
@@ -177,12 +177,20 @@ or stop it:
 
     $ 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::
 
     :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,
 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
 
 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:
 
 .. code-block:: bash

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

@@ -522,7 +522,7 @@ Fixes
         >>> result.get()
         '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
     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
         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`.
 
     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
     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:
 
     `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
     positional arguments in the future, so please do not depend on this
     behavior.
@@ -360,7 +360,7 @@ News
     There's also a Debian init.d script for :mod:`~celery.bin.celeryev` available,
     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:`--logfile|-f`: Log file

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

@@ -233,7 +233,7 @@ Fixes
 * celerybeat:  PersistentScheduler now automatically removes a corrupted
   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.
 
 * Programs no longer tries to load the configuration file when showing
@@ -708,7 +708,7 @@ Important Notes
             $ camqadm exchange.delete celeryevent
 
 * `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
   by two dashes:
@@ -912,7 +912,7 @@ News
    scheduled tasks.
 
 * The configuration module and loader to use can now be specified on
-  the command line.
+  the command-line.
 
     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.
 
     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
 

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

@@ -133,10 +133,10 @@ Fixes
 
     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
-    on the command line for celeryctl:
+    on the command-line for celeryctl:
 
     .. code-block:: bash
 

+ 2 - 1
docs/internals/guide.rst

@@ -260,9 +260,10 @@ Module Overview
 - celery.apps
 
     Major user applications: ``celeryd``, and ``celerybeat``
+
 - celery.bin
 
-    Command line applications.
+    Command-line applications.
     setup.py creates setuptools entrypoints for these.
 
 - 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
 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``.
 
 .. _monitoring-celeryev:

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

@@ -254,7 +254,7 @@ location for this file:
 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`,
 which is simply keeping track of the last run times in a local database file
 (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
 
-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:
 
 .. code-block:: bash
@@ -153,7 +153,7 @@ Remote control
 .. sidebar:: The ``celery`` command
 
     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.
 
 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.
 
-- 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
   followed by ``--``, for example:
@@ -473,7 +473,7 @@ In Other News
 
     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`.
 

+ 2 - 2
docs/whatsnew-3.0.rst

@@ -50,7 +50,7 @@ Highlights
 
         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.
 
     - 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
 -------------------------------
 
-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.
 
 You can see a list of subcommands and options by running: