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: try:
if pass_task_orchestrator: if pass_task_orchestrator:
work = lambda body=body, t=task: func( orchestrator.run_subtask(
body, context, orchestrator, t.id subtask.id,
work=lambda: func(body, context, orchestrator, task.id),
cloud_logs_url=cloud_logs_url,
) )
else: else:
work = lambda body=body: func(body, context) orchestrator.run_subtask(
orchestrator.run_subtask( subtask.id,
subtask.id, work=lambda: func(body, context),
work=work, cloud_logs_url=cloud_logs_url,
cloud_logs_url=cloud_logs_url, )
)
except Exception: except Exception:
logger.exception( logger.exception(
"subtask failed (task_source=%s source_id=%s)", "subtask failed (task_source=%s source_id=%s)",