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

Method task_received_handler

t/integration/test_tasks.py:904–911  ·  view source on GitHub ↗
(request, **kwargs)

Source from the content-addressed store, hash-verified

902 def test_replaced_task_nesting_level_0(self, manager):
903 @task_received.connect
904 def task_received_handler(request, **kwargs):
905 nonlocal assertion_result
906
907 try:
908 # This tests mainly that the field even exists and set to default 0
909 assertion_result = request.replaced_task_nesting < 1
910 except Exception:
911 assertion_result = False
912
913 non_replaced_task = add.si(4, 2)
914 res = non_replaced_task.delay()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected