Create a new signature from a dict. Subclasses can override this method to customize how are they created from a dict.
(cls, d, app=None)
| 308 | |
| 309 | @classmethod |
| 310 | def from_dict(cls, d, app=None): |
| 311 | """Create a new signature from a dict. |
| 312 | Subclasses can override this method to customize how are |
| 313 | they created from a dict. |
| 314 | """ |
| 315 | typ = d.get('subtask_type') |
| 316 | if typ: |
| 317 | target_cls = cls.TYPES[typ] |
| 318 | if target_cls is not cls: |
| 319 | return target_cls.from_dict(d, app=app) |
| 320 | return Signature(d, app=app) |
| 321 | |
| 322 | def __init__(self, task=None, args=None, kwargs=None, options=None, |
| 323 | type=None, subtask_type=None, immutable=False, |