Spec-Zone.ru › Celery

celery.bootsteps

A directed acyclic graph of reusable components.

classcelery.bootsteps.Blueprint(steps=None, name=None, on_start=None, on_close=None, on_stopped=None)

Blueprint containing bootsteps that can be applied to objects.

Parameters:
  • Sequence[Union[str (steps) – List of steps.

  • Step]] – List of steps.

  • name (str) – Set explicit name for this blueprint.

  • on_start (Callable) – Optional callback applied after blueprint start.

  • on_close (Callable) – Optional callback applied before blueprint close.

  • on_stopped (Callable) – Optional callback applied after blueprint stopped.

GraphFormatter

alias of StepFormatter

propertyalias
apply(parent, **kwargs)

Apply the steps in this blueprint to an object.

This will apply the __init__ and include methods of each step, with the object as argument:

step = Step(obj)
...
step.include(obj)

For StartStopStep the services created will also be added to the objects steps attribute.

claim_steps()
close(parent)
connect_with(other)
default_steps={}
human_state()
info(parent)
join(timeout=None)
load_step(step)
name=None
restart(parent, method='stop', description='restarting', propagate=False)
send_all(parent, method, description=None, reverse=True, propagate=True, args=())
start(parent)
started=0
state=None
state_to_name={0: 'initializing', 1: 'running', 2: 'closing', 3: 'terminating'}
stop(parent, close=True, terminate=False)
classcelery.bootsteps.ConsumerStep(parent, **kwargs)

Bootstep that starts a message consumer.

consumers=None
get_consumers(channel)
name='celery.bootsteps.ConsumerStep'
requires=('celery.worker.consumer:Connection',)
shutdown(c)
start(c)
stop(c)
classcelery.bootsteps.StartStopStep(parent, **kwargs)

Bootstep that must be started and stopped in order.

close(parent)
include(parent)
name='celery.bootsteps.StartStopStep'
obj=None
start(parent)
stop(parent)
terminate(parent)
classcelery.bootsteps.Step(parent, **kwargs)

A Bootstep.

The __init__() method is called when the step is bound to a parent object, and can as such be used to initialize attributes in the parent object at parent instantiation-time.

propertyalias
conditional=False
create(parent)

Create the step.

enabled=True
include(parent)
include_if(parent)

Return true if bootstep should be included.

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

info(obj)
instantiate(name, *args, **kwargs)
label=None
last=False
name='celery.bootsteps.Step'
requires=()

Copyright © 2017-2026 Asif Saif Uddin, core team & contributors. All rights reserved.
Celery is licensed under The BSD License (3 Clause, also known as the new BSD license). The license is an OSI approved Open Source license and is GPL-compatible.
https://docs.celeryq.dev/en/stable/reference/celery.bootsteps.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API