你正在阅读 Celery 3.1 的文档。开发版本文档见: 此处.

celery.worker.components

celery.worker.components

Default worker bootsteps.

class celery.worker.components.Timer(parent, **kwargs)[源代码]

This step initializes the internal timer used by the worker.

create(w)[源代码]
name = u'celery.worker.components.Timer'
on_timer_error(exc)[源代码]
on_timer_tick(delay)[源代码]
requires = ()
class celery.worker.components.Hub(w, **kwargs)[源代码]
create(w)[源代码]
include_if(w)[源代码]
name = u'celery.worker.components.Hub'
requires = (step:celery.worker.components.Timer{()},)
start(w)[源代码]
stop(w)[源代码]
terminate(w)[源代码]
class celery.worker.components.Queues(parent, **kwargs)[源代码]

This bootstep initializes the internal queues used by the worker.

create(w)[源代码]
label = 'Queues (intra)'
name = u'celery.worker.components.Queues'
requires = (step:celery.worker.components.Hub{(step:celery.worker.components.Timer{()},)},)
class celery.worker.components.Pool(w, autoscale=None, autoreload=None, no_execv=False, optimization=None, **kwargs)[源代码]

Bootstep managing the worker pool.

Describes how to initialize the worker pool, and starts and stops the pool during worker startup/shutdown.

Adds attributes:

  • autoscale
  • pool
  • max_concurrency
  • min_concurrency
close(w)[源代码]
create(w, semaphore=None, max_restarts=None)[源代码]
info(w)[源代码]
name = u'celery.worker.components.Pool'
register_with_event_loop(w, hub)[源代码]
requires = (step:celery.worker.components.Queues{(step:celery.worker.components.Hub{(step:celery.worker.components.Timer{()},)},)},)
terminate(w)[源代码]
class celery.worker.components.Beat(w, beat=False, **kwargs)[源代码]

Step used to embed a beat process.

This will only be enabled if the beat argument is set.

conditional = True
create(w)[源代码]
label = 'Beat'
name = u'celery.worker.components.Beat'
requires = ()
class celery.worker.components.StateDB(w, **kwargs)[源代码]

This bootstep sets up the workers state db if enabled.

create(w)[源代码]
name = u'celery.worker.components.StateDB'
requires = ()
class celery.worker.components.Consumer(parent, **kwargs)[源代码]
create(w)[源代码]
last = True
name = u'celery.worker.components.Consumer'
requires = ()

上一个主题

Internal Module Reference

下一个主题

celery.worker.loops

本页