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

Function record_replaced_task_nesting

t/integration/tasks.py:165–174  ·  view source on GitHub ↗

Record the nesting level across successive task replacements.

(self, replacements, nesting=None)

Source from the content-addressed store, hash-verified

163
164@shared_task(bind=True)
165def record_replaced_task_nesting(self, replacements, nesting=None):
166 """Record the nesting level across successive task replacements."""
167 if nesting is None:
168 nesting = []
169 nesting.append(self.request.replaced_task_nesting)
170 if replacements:
171 replacement = record_replaced_task_nesting.s(replacements - 1, nesting)
172 # Keep the caller's result queue when using the RPC backend.
173 return self.replace(replacement.set(reply_to=self.request.reply_to))
174 return nesting
175
176
177@shared_task(bind=True)

Callers

nothing calls this directly

Calls 3

sMethod · 0.45
replaceMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected