MCPcopy Create free account
hub / github.com/celery/celery / replace

Method replace

celery/canvas.py:688–701  ·  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

686 _freeze = freeze
687
688 def replace(self, args=None, kwargs=None, options=None):
689 """Replace the args, kwargs or options set for this signature.
690
691 These are only replaced if the argument for the section is
692 not :const:`None`.
693 """
694 signature = self.clone()
695 if args is not None:
696 signature.args = args
697 if kwargs is not None:
698 signature.kwargs = kwargs
699 if options is not None:
700 signature.options = options
701 return signature
702
703 def set(self, immutable=None, **options):
704 """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