Explorar el Código

Small doc stuff

Ask Solem hace 11 años
padre
commit
f1601c0755
Se han modificado 3 ficheros con 31 adiciones y 3 borrados
  1. 2 2
      celery/bin/worker.py
  2. 2 1
      docs/configuration.rst
  3. 27 0
      docs/internals/guide.rst

+ 2 - 2
celery/bin/worker.py

@@ -71,8 +71,8 @@ The :program:`celery worker` command (previously known as ``celeryd``)
 
 .. cmdoption:: -E, --events
 
-    Send events that can be captured by monitors like :program:`celery events`,
-    `celerymon`, and others.
+    Send task-related events that can be captured by monitors like
+    :program:`celery events`, `celerymon`, and others.
 
 .. cmdoption:: --without-gossip
 

+ 2 - 1
docs/configuration.rst

@@ -1509,7 +1509,8 @@ Events
 CELERY_SEND_EVENTS
 ~~~~~~~~~~~~~~~~~~
 
-Send events so the worker can be monitored by tools like `celerymon`.
+Send task-related events so that tasks can be monitored using tools like
+`flower`.  Sets the default value for the workers :option:`-E` argument.
 
 .. setting:: CELERY_SEND_TASK_SENT_EVENT
 

+ 27 - 0
docs/internals/guide.rst

@@ -305,3 +305,30 @@ Module Overview
 - celery.contrib
 
     Additional public code that doesn't fit into any other namespace.
+
+Worker overview
+===============
+
+* `celery.bin.worker:Worker`
+
+   This is the command-line interface to the worker.
+
+   Responsibilities:
+       * Daemonization when `--detach` set,
+       * dropping privileges when using `--uid`/`--gid` arguments
+       * Installs "concurrency patches" (eventlet/gevent monkey patches).
+
+  ``app.worker_main(argv)`` calls
+  ``instantiate('celery.bin.worker:Worker')(app).execute_from_commandline(argv)``
+
+* `app.Worker` -> `celery.apps.worker:Worker`
+
+   Responsibilities:
+   * sets up logging and redirects stdouts
+   * installs signal handlers (`TERM`/`HUP`/`STOP`/`USR1` (cry)/`USR2` (rdb))
+   * prints banner and warnings (e.g. pickle warning)
+   * handles the ``--purge`` argument
+
+* `app.WorkController` -> `celery.worker.WorkController`
+
+   This is the real worker, built up around bootsteps.