Skip to main content

revoke_by_stamped_headers

Revoke task by header (or list of headers).

def revoke_by_stamped_headers(
state: object,
headers: dict|list,
terminate: boolean = False,
signal: string = None,
**kwargs: any
) - > object

Revoke task by header (or list of headers).

Parameters

NameTypeDescription
stateobjectThe current worker or consumer state object used to access the execution pool.
headers`dictlist`
terminateboolean = FalseIf True, immediately terminates the process of any active tasks that match the provided stamped headers.
signalstring = NoneThe name of the cryptographic or system signal (e.g., 'KILL' or 'TERM') to send when terminating active tasks.
**kwargsanyAdditional keyword arguments passed to the control command handler.

Returns

TypeDescription
objectA status object indicating whether the headers were flagged for revocation and if any active tasks were successfully terminated.