Tasks
Bootstep starting the task message consumer.
Attributes
| Attribute | Type | Description |
|---|---|---|
| requires | tuple = (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
| Name | Type | Description |
|---|---|---|
| c | Any | The consumer instance being initialized. |
| **kwargs | dict | Additional keyword arguments passed to the parent bootstep constructor. |
Methods
start()
@classmethod
def start(
c: celery.worker.consumer.Consumer
) - > null
Start task consumer.
Parameters
| Name | Type | Description |
|---|---|---|
| c | celery.worker.consumer.Consumer | The consumer instance being initialized and configured |
Returns
| Type | Description |
|---|---|
null | Nothing is returned |
stop()
@classmethod
def stop(
c: celery.worker.consumer.Consumer
) - > null
Stop task consumer.
Parameters
| Name | Type | Description |
|---|---|---|
| c | celery.worker.consumer.Consumer | The consumer instance whose task consumer should be canceled |
Returns
| Type | Description |
|---|---|
null | Nothing is returned |
shutdown()
@classmethod
def shutdown(
c: celery.worker.consumer.Consumer
) - > null
Shutdown task consumer.
Parameters
| Name | Type | Description |
|---|---|---|
| c | celery.worker.consumer.Consumer | The consumer instance whose channel and task consumer should be closed |
Returns
| Type | Description |
|---|---|
null | Nothing is returned |
info()
@classmethod
def info(
c: celery.worker.consumer.Consumer
) - > dict
Return task consumer info.
Parameters
| Name | Type | Description |
|---|---|---|
| c | celery.worker.consumer.Consumer | The consumer instance to query for QoS information |
Returns
| Type | Description |
|---|---|
dict | A 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
| Name | Type | Description |
|---|---|---|
| c | celery.worker.consumer.Consumer | The consumer instance used to inspect connection properties and application configuration |
Returns
| Type | Description |
|---|---|
bool | True if global QoS semantics should be used based on broker version and queue types, False otherwise |