fast_trace_task
Executes a task trace by decoding the message body, updating the request state with task arguments and metadata, and invoking the task's internal tracing mechanism.
def fast_trace_task(
task: str,
uuid: str,
request: dict,
body: bytes|tuple,
content_type: str,
content_encoding: str,
loads: callable = loads_message,
_loc: tuple = None,
hostname: str = None
) - > tuple
Executes a task trace by deserializing the message body and invoking the task's internal tracing mechanism. Use this function to efficiently process and track task execution state within a distributed worker environment.
Parameters
| Name | Type | Description |
|---|---|---|
| task | str | The name of the task to be traced, used as a key to look up the task instance. |
| uuid | str | The unique identifier for the specific task execution instance. |
| request | dict | The request context dictionary to be updated with task arguments and metadata. |
| body | `bytes | tuple` |
| content_type | str | The MIME type of the message body used to determine the appropriate deserialization method. |
| content_encoding | str | The character encoding or compression format of the message body. |
| loads | callable = loads_message | The deserialization function used to parse the message body into Python objects. |
| _loc | tuple = None | A cached tuple containing the task registry, accepted content types, and hostname for performance optimization. |
| hostname | str = None | The name of the node executing the task, used for logging and request metadata. |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing the execution status (1 for success, 0 for failure), the result or traceback string, and the execution time. |