This document describes an older version of Celery (2.5). For the latest stable version please 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:
  1. 2009 - 2012 by Ask Solem.
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.5.5'}

Worker software/platform information.

celery.worker.state.active_requests = set([])

set of currently active Request‘s.

celery.worker.state.reserved_requests = set([])

set of all reserved Request‘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()

Updates global state when a task has been reserved.

celery.worker.state.total_count = defaultdict(<function <lambda> at 0x6b63938>, {})

count of tasks executed by the worker, sorted by type.

Previous topic

celery.worker.heartbeat

Next topic

celery.worker.strategy

This Page