This document describes Celery 2.4. For development docs, go here.
celery.worker.state¶
celery.worker.state¶
Internal worker state (global)
This includes the currently active and reserved tasks, statistics, and revoked tasks.
| copyright: |
|
|---|---|
| license: | BSD, see LICENSE for more details. |
-
class
celery.worker.state.Persistent(filename)¶ -
close()¶
-
db¶
-
merge(d)¶
-
open()¶
-
save()¶
-
storage= <module 'shelve' from '/usr/lib/python2.7/shelve.pyc'>¶
-
sync(d)¶
-
-
celery.worker.state.REVOKES_MAX= 10000¶ maximum number of revokes to keep in memory.
-
celery.worker.state.REVOKE_EXPIRES= 3600¶ how many seconds a revoke will be active before being expired when the max limit has been exceeded.
-
celery.worker.state.SOFTWARE_INFO= {'sw_sys': 'Linux', 'sw_ident': 'celeryd', 'sw_ver': '2.4.7'}¶ Worker software/platform information.
-
celery.worker.state.active_requests= set([])¶ set of currently active
TaskRequest‘s.
-
celery.worker.state.reserved_requests= set([])¶ set of all reserved
TaskRequest‘s.
-
celery.worker.state.revoked= LimitedSet([[]])¶ the list of currently revoked tasks. Persistent if statedb set.
-
celery.worker.state.task_accepted(request)¶ Updates global state when a task has been accepted.
-
celery.worker.state.task_ready(request)¶ Updates global state when a task is ready.
-
celery.worker.state.task_reserved(request)¶ Updates global state when a task has been reserved.
-
celery.worker.state.total_count= defaultdict(<function <lambda> at 0x7fb4ebfcb7d0>, {})¶ count of tasks executed by the worker, sorted by type.