MCPcopy
hub / github.com/celery/celery / on_task_call

Method on_task_call

celery/backends/rpc.py:217–223  ·  view source on GitHub ↗
(self, producer, task_id)

Source from the content-addressed store, hash-verified

215 raise NotImplementedError(E_NO_CHORD_SUPPORT.strip())
216
217 def on_task_call(self, producer, task_id):
218 # Called every time a task is sent when using this backend.
219 # We declare the queue we receive replies on in advance of sending
220 # the message, but we skip this if running in the prefork pool
221 # (task_join_will_block), as we know the queue is already declared.
222 if not task_join_will_block():
223 maybe_declare(self.binding(producer.channel), retry=True)
224
225 def destination_for(self, task_id, request):
226 """Get the destination for result by task id.

Callers

nothing calls this directly

Calls 2

bindingMethod · 0.95
task_join_will_blockFunction · 0.90

Tested by

no test coverage detected