Skip to main content

Tasks

Bootstep starting the task message consumer.

Attributes

AttributeTypeDescription
requirestuple = (Mingle,)A tuple of bootstep classes that must be executed before this step can start, specifically requiring the Mingle step.

Constructor

Signature

def Tasks(
c: Any,
**kwargs: dict
)

Parameters

NameTypeDescription
cAnyThe consumer instance being initialized.
**kwargsdictAdditional keyword arguments passed to the parent bootstep constructor.

Methods


start()

@classmethod
def start(
c: celery.worker.consumer.Consumer
) - > null

Start task consumer.

Parameters

NameTypeDescription
ccelery.worker.consumer.ConsumerThe consumer instance being initialized and configured

Returns

TypeDescription
nullNothing is returned

stop()

@classmethod
def stop(
c: celery.worker.consumer.Consumer
) - > null

Stop task consumer.

Parameters

NameTypeDescription
ccelery.worker.consumer.ConsumerThe consumer instance whose task consumer should be canceled

Returns

TypeDescription
nullNothing is returned

shutdown()

@classmethod
def shutdown(
c: celery.worker.consumer.Consumer
) - > null

Shutdown task consumer.

Parameters

NameTypeDescription
ccelery.worker.consumer.ConsumerThe consumer instance whose channel and task consumer should be closed

Returns

TypeDescription
nullNothing is returned

info()

@classmethod
def info(
c: celery.worker.consumer.Consumer
) - > dict

Return task consumer info.

Parameters

NameTypeDescription
ccelery.worker.consumer.ConsumerThe consumer instance to query for QoS information

Returns

TypeDescription
dictA dictionary containing the current prefetch_count value or 'N/A' if QoS is not configured

qos_global()

@classmethod
def qos_global(
c: celery.worker.consumer.Consumer
) - > bool

Determine if global QoS should be applied.

Parameters

NameTypeDescription
ccelery.worker.consumer.ConsumerThe consumer instance used to inspect connection properties and application configuration

Returns

TypeDescription
boolTrue if global QoS semantics should be used based on broker version and queue types, False otherwise