MCPcopy
hub / github.com/celery/celery / replace

Method replace

celery/canvas.py:523–536  ·  view source on GitHub ↗

Replace the args, kwargs or options set for this signature. These are only replaced if the argument for the section is not :const:`None`.

(self, args=None, kwargs=None, options=None)

Source from the content-addressed store, hash-verified

521 _freeze = freeze
522
523 def replace(self, args=None, kwargs=None, options=None):
524 """Replace the args, kwargs or options set for this signature.
525
526 These are only replaced if the argument for the section is
527 not :const:`None`.
528 """
529 signature = self.clone()
530 if args is not None:
531 signature.args = args
532 if kwargs is not None:
533 signature.kwargs = kwargs
534 if options is not None:
535 signature.options = options
536 return signature
537
538 def set(self, immutable=None, **options):
539 """Set arbitrary execution options (same as ``.options.update(…)``).

Callers 1

test_replaceMethod · 0.95

Calls 1

cloneMethod · 0.95

Tested by 1

test_replaceMethod · 0.76