task_handler: fix pyright unknown-type errors in pass_task_orchestrator branch 🟪

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-06-24 11:15:58 +00:00
parent e1bc5360f2
commit d06e92cd75

View file

@ -67,16 +67,17 @@ def task_handler(
try:
if pass_task_orchestrator:
work = lambda body=body, t=task: func(
body, context, orchestrator, t.id
orchestrator.run_subtask(
subtask.id,
work=lambda: func(body, context, orchestrator, task.id),
cloud_logs_url=cloud_logs_url,
)
else:
work = lambda body=body: func(body, context)
orchestrator.run_subtask(
subtask.id,
work=work,
cloud_logs_url=cloud_logs_url,
)
orchestrator.run_subtask(
subtask.id,
work=lambda: func(body, context),
cloud_logs_url=cloud_logs_url,
)
except Exception:
logger.exception(
"subtask failed (task_source=%s source_id=%s)",