MCPcopy
hub / github.com/celery/celery / trace_task_ret

Function trace_task_ret

celery/app/trace.py:735–754  ·  view source on GitHub ↗
(name, uuid, request, body, content_type,
                   content_encoding, loads=loads_message, app=None,
                   **extra_request)

Source from the content-addressed store, hash-verified

733
734
735def trace_task_ret(name, uuid, request, body, content_type,
736 content_encoding, loads=loads_message, app=None,
737 **extra_request):
738 app = app or current_app._get_current_object()
739 embed = None
740 if content_type:
741 accept = prepare_accept_content(app.conf.accept_content)
742 args, kwargs, embed = loads(
743 body, content_type, content_encoding, accept=accept,
744 )
745 else:
746 args, kwargs, embed = body
747 hostname = gethostname()
748 request.update({
749 'args': args, 'kwargs': kwargs,
750 'hostname': hostname, 'is_eager': False,
751 }, **embed or {})
752 R, I, T, Rstr = trace_task(app.tasks[name],
753 uuid, args, kwargs, request, app=app)
754 return (1, R, T) if I else (0, Rstr, T)
755
756
757def fast_trace_task(task, uuid, request, body, content_type,

Calls 3

trace_taskFunction · 0.85
_get_current_objectMethod · 0.45
updateMethod · 0.45