Skip to main content

Consumer

Bootstep starting the Consumer blueprint.

Attributes

AttributeTypeDescription
lastbool = TrueA boolean flag indicating that this bootstep must be executed last in the blueprint sequence.

Constructor

Signature

def Consumer()

Methods


create()

@classmethod
def create(
w: [Worker](../../events/state/worker.md?sid=celery_events_state_worker)
) - > celery.worker.consumer.Consumer

Instantiates and initializes the consumer instance for the worker, calculating the initial prefetch count based on concurrency settings.

Parameters

NameTypeDescription
w[Worker](../../events/state/worker.md?sid=celery_events_state_worker)The worker instance providing configuration, pool, timer, and application context for the consumer.

Returns

TypeDescription
celery.worker.consumer.ConsumerThe newly created consumer instance attached to the worker.