task_message_from_sig
Create task message from :class:celery.Signature.
def task_message_from_sig(
app: Celery,
sig: Signature,
utc: bool = True,
TaskMessage: Any = TaskMessage
) - > TaskMessage
Create task message from :class:celery.Signature.
Parameters
| Name | Type | Description |
|---|---|---|
| app | Celery | The Celery application instance used to resolve current time and configuration. |
| sig | Signature | The task signature to be converted into a message; this signature will be frozen during the process. |
| utc | bool = True | Flag indicating whether the message timestamps should be treated as UTC. |
| TaskMessage | Any = TaskMessage | The class or factory function used to instantiate the resulting task message object. |
Returns
| Type | Description |
|---|---|
TaskMessage | A TaskMessage instance containing the frozen signature data, formatted ETA/expiry, and task metadata ready for publishing. |