MCPcopy
hub / github.com/celery/celery / replaced_identity

Function replaced_identity

examples/stamping/tasks.py:65–71  ·  view source on GitHub ↗
(self: MonitoredTask, x)

Source from the content-addressed store, hash-verified

63
64@app.task(bind=True, base=MonitoredTask)
65def replaced_identity(self: MonitoredTask, x):
66 log_demo(self)
67 logger.warning("Stamping identity_task with MonitoringIdStampingVisitor() before replace")
68 replaced_task = identity_task.s(x)
69 # These stamps should be overridden by the stamps from MonitoredTask.on_replace()
70 replaced_task.stamp(MonitoringIdStampingVisitor())
71 return self.replace(replaced_task)
72
73
74@app.task(bind=True, base=StampOnReplace)

Callers

nothing calls this directly

Calls 5

log_demoFunction · 0.85
sMethod · 0.45
stampMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected