maybe_signature
Ensure obj is a signature, or None.
def maybe_signature(
d: Optional[Union[abstract.CallableSignature, Mapping]],
app: celery.Celery,
clone: bool
) - > Optional[abstract.CallableSignature]
Ensure obj is a signature, or None.
Parameters
| Name | Type | Description |
|---|---|---|
| d | Optional[Union[abstract.CallableSignature, Mapping]] | The signature object or dictionary-serialized signature to be converted or validated. |
| app | celery.Celery | The Celery application instance to bind the signature to. |
| clone | bool | If enabled, creates a copy of the signature if the input 'd' is already a signature object. |
Returns
| Type | Description |
|---|---|
Optional[abstract.CallableSignature] | The resulting signature object bound to the app, or None if the input was None. |