celery.worker.components

Worker-level Bootsteps.

class celery.worker.components.Beat(w, beat=False, **kwargs)[исходный код]

Step used to embed a beat process.

Enabled when the beat argument is set.

conditional = True
create(w)[исходный код]

Create the step.

label = 'Beat'
name = 'celery.worker.components.Beat'
class celery.worker.components.Consumer(parent, **kwargs)[исходный код]

Bootstep starting the Consumer blueprint.

create(w)[исходный код]

Create the step.

last = True
name = 'celery.worker.components.Consumer'
class celery.worker.components.Hub(w, **kwargs)[исходный код]

Worker starts the event loop.

create(w)[исходный код]

Create the step.

include_if(w)[исходный код]

Return true if bootstep should be included.

You can define this as an optional predicate that decides whether this step should be created.

name = 'celery.worker.components.Hub'
requires = (step:celery.worker.components.Timer{()},)
start(w)[исходный код]
stop(w)[исходный код]
terminate(w)[исходный код]
class celery.worker.components.Pool(w, autoscale=None, **kwargs)[исходный код]

Bootstep managing the worker pool.

Describes how to initialize the worker pool, and starts and stops the pool during worker start-up/shutdown.

Adds attributes:

  • autoscale

  • pool

  • max_concurrency

  • min_concurrency

close(w)[исходный код]
create(w)[исходный код]

Create the step.

info(w)[исходный код]
name = 'celery.worker.components.Pool'
register_with_event_loop(w, hub)[исходный код]
requires = (step:celery.worker.components.Hub{(step:celery.worker.components.Timer{()},)},)
terminate(w)[исходный код]
class celery.worker.components.StateDB(w, **kwargs)[исходный код]

Bootstep that sets up between-restart state database file.

create(w)[исходный код]

Create the step.

name = 'celery.worker.components.StateDB'
class celery.worker.components.Timer(parent, **kwargs)[исходный код]

Timer bootstep.

create(w)[исходный код]

Create the step.

name = 'celery.worker.components.Timer'
on_timer_error(exc)[исходный код]
on_timer_tick(delay)[исходный код]
Back to Top