hybrid_to_proto2
Create a fresh protocol 2 message from a hybrid protocol 1/2 message.
def hybrid_to_proto2(
message: Message,
body: dict
) - > tuple
Create a fresh protocol 2 message from a hybrid protocol 1/2 message.
Parameters
| Name | Type | Description |
|---|---|---|
| message | Message | The original message object containing transport-level headers to be merged into the new protocol 2 structure. |
| body | dict | The message body dictionary containing task metadata, arguments, and execution options like ETA and retries. |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing the task payload (args, kwargs, and embedded callbacks), the merged header dictionary, a boolean flag indicating protocol 2, and the UTC timezone setting. |