task_handler passes orchestrator and task_id to wrapped function when flag is true 🟩

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-06-24 10:48:40 +00:00
parent 3a66819a86
commit 35a794563a

View file

@ -66,9 +66,15 @@ def task_handler(
)
try:
if pass_task_orchestrator:
work = lambda body=body, t=task: func(
body, context, orchestrator, t.id
)
else:
work = lambda body=body: func(body, context)
orchestrator.run_subtask(
subtask.id,
work=lambda body=body: func(body, context),
work=work,
cloud_logs_url=cloud_logs_url,
)
except Exception: