Skip to main content

cancel_consumer

Tell worker(s) to stop consuming from task queue by name.

def cancel_consumer(
state: State,
queue: str
) - > dict

Tell worker(s) to stop consuming from task queue by name.

Parameters​

NameTypeDescription
stateStateThe current worker state object containing the consumer instance
queuestrThe name of the task queue to stop consuming from

Returns​

TypeDescription
dictA success response dictionary containing a confirmation message that the worker is no longer consuming from the specified queue