|
@@ -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.
|