|
@@ -1,5 +1,36 @@
|
|
|
#!/usr/bin/env python
|
|
|
-"""celeryd"""
|
|
|
+"""celeryd
|
|
|
+
|
|
|
+.. program:: celeryd
|
|
|
+
|
|
|
+.. cmdoption:: -c, --concurrency
|
|
|
+
|
|
|
+ Number of child processes processing the queue.
|
|
|
+
|
|
|
+.. cmdoption:: -f, --logfile
|
|
|
+
|
|
|
+ Path to log file. If no logfile is specified, ``stderr`` is used.
|
|
|
+
|
|
|
+.. cmdoption:: -l, --loglevel
|
|
|
+
|
|
|
+ Logging level, choose between ``DEBUG``, ``INFO``, ``WARNING``,
|
|
|
+ ``ERROR``, ``CRITICAL``, or ``FATAL``.
|
|
|
+
|
|
|
+.. cmdoption:: -p, --pidfile
|
|
|
+
|
|
|
+ Path to pidfile.
|
|
|
+
|
|
|
+.. cmdoption:: -w, --wakeup-after
|
|
|
+
|
|
|
+ If the queue is empty, this is the time *in seconds* the
|
|
|
+ daemon sleeps until it wakes up to check if there's any
|
|
|
+ new messages on the queue.
|
|
|
+
|
|
|
+.. cmdoption:: -d, --daemon
|
|
|
+
|
|
|
+ Run in the background as a daemon.
|
|
|
+
|
|
|
+"""
|
|
|
import os
|
|
|
import sys
|
|
|
sys.path.append(os.getcwd())
|
|
@@ -63,7 +94,7 @@ def parse_options(arguments):
|
|
|
help="Choose between DEBUG/INFO/WARNING/ERROR/CRITICAL/FATAL.")
|
|
|
parser.add_option('-p', '--pidfile', default=DAEMON_PID_FILE,
|
|
|
action="store", dest="pidfile",
|
|
|
- help="Path to PID file.")
|
|
|
+ help="Path to pidfile.")
|
|
|
parser.add_option('-w', '--wakeup-after', default=QUEUE_WAKEUP_AFTER,
|
|
|
action="store", dest="queue_wakeup_after",
|
|
|
help="If the queue is empty, this is the time *in seconds* the "
|
|
@@ -71,7 +102,7 @@ def parse_options(arguments):
|
|
|
"new messages on the queue.")
|
|
|
parser.add_option('-d', '--daemon', default=False,
|
|
|
action="store_true", dest="daemon",
|
|
|
- help="Run in background as a daemon.")
|
|
|
+ help="Run in the background as a daemon.")
|
|
|
options, values = parser.parse_args(arguments)
|
|
|
if not isinstance(options.loglevel, int):
|
|
|
options.loglevel = LOG_LEVELS[options.loglevel.upper()]
|