MCPcopy
hub / github.com/celery/celery / signature

Function signature

celery/canvas.py:2373–2387  ·  view source on GitHub ↗

Create new signature. - if the first argument is a signature already then it's cloned. - if the first argument is a dict, then a Signature version is returned. Returns: Signature: The resulting signature.

(varies, *args, **kwargs)

Source from the content-addressed store, hash-verified

2371
2372
2373def signature(varies, *args, **kwargs):
2374 """Create new signature.
2375
2376 - if the first argument is a signature already then it's cloned.
2377 - if the first argument is a dict, then a Signature version is returned.
2378
2379 Returns:
2380 Signature: The resulting signature.
2381 """
2382 app = kwargs.get('app')
2383 if isinstance(varies, dict):
2384 if isinstance(varies, abstract.CallableSignature):
2385 return varies.clone()
2386 return Signature.from_dict(varies, app=app)
2387 return Signature(varies, *args, **kwargs)
2388
2389
2390subtask = signature # XXX compat

Calls 4

SignatureClass · 0.85
getMethod · 0.45
cloneMethod · 0.45
from_dictMethod · 0.45