celery.worker.components

    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)

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

    • 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:

    • close(w)

    • create(w, semaphore=None, max_restarts=None)[源代码]

    • info(w)

    • name = u’celery.worker.components.Pool’

    • register_with_event_loop(w, hub)[源代码]

    • terminate(w)

    class celery.worker.components.Beat(w, beat=False, \*kwargs*)[源代码]

    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 = ()