I've started using Celery 4.1 in my Django Python project and have come across Signatures.
In the documentation it says the following:
You just learned how to call a task using the tasks delay method in the calling guide, and this is often all you need, but sometimes you may want to pass the signature of a task invocation to another process or as an argument to another function.
A signature() wraps the arguments, keyword arguments, and execution options of a single task invocation in a way such that it can be passed to functions or even serialized and sent across the wire.
Although I see them used in some of the examples I don't really know when and why to use them, as well as which problems they solve. Can someone explain this to a layman?
Signature used together with chain to create a workflow. ".s" is the abbreviation of ".signature". when use ".s", means that the result or return value of the front task will be pass to the next one. The opposite of 'signature' is 'immutable signature', in which every task is independent. for example(signature):
example(immutable signature):