Skip to main content

task_accepted

Update global state when a task has been accepted.

def task_accepted(
request: object,
_all_total_count: list = None,
add_request: callable = requests.__setitem__,
add_active_request: callable = active_requests.add,
add_to_total_count: callable = total_count.update
) - > null

Update global state when a task has been accepted.

Parameters

NameTypeDescription
requestobjectThe task request object containing unique identification and metadata to be tracked.
_all_total_countlist = NoneAn optional reference to the global counter list; defaults to the module-level all_total_count if not provided.
add_requestcallable = requests.setitemA function used to map the request ID to the request object in the global registry.
add_active_requestcallable = active_requests.addA function used to add the request to the set of currently processing tasks.
add_to_total_countcallable = total_count.updateA function used to increment the per-task-name execution counter.

Returns

TypeDescription
nullNothing is returned; the function modifies global state and request tracking collections directly.