← back to Exo
fix: finalize cancel tasks (#1498)
2e29605194af486f80d9a90bb28524ffa3bbe4e5 · 2026-02-19 16:27:34 +0300 · Mustafa Alp Yılmaz
# Cancel task finalization (main.py)
After forwarding the cancel to the runner supervisor, emit TaskStatusUpdated(Complete) for the cancel task itself. This ensures the cancel task is properly removed from state.tasks.
Files touched
Diff
commit 2e29605194af486f80d9a90bb28524ffa3bbe4e5
Author: Mustafa Alp Yılmaz <96022931+mustafalpyilmaz@users.noreply.github.com>
Date: Thu Feb 19 16:27:34 2026 +0300
fix: finalize cancel tasks (#1498)
# Cancel task finalization (main.py)
After forwarding the cancel to the runner supervisor, emit TaskStatusUpdated(Complete) for the cancel task itself. This ensures the cancel task is properly removed from state.tasks.
---
src/exo/worker/main.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/exo/worker/main.py b/src/exo/worker/main.py
index af105652..3bafedaa 100644
--- a/src/exo/worker/main.py
+++ b/src/exo/worker/main.py
@@ -241,6 +241,11 @@ class Worker:
cancelled_task_id=cancelled_task_id, runner_id=runner_id
):
await self.runners[runner_id].cancel_task(cancelled_task_id)
+ await self.event_sender.send(
+ TaskStatusUpdated(
+ task_id=task.task_id, task_status=TaskStatus.Complete
+ )
+ )
case ImageEdits() if task.task_params.total_input_chunks > 0:
# Assemble image from chunks and inject into task
cmd_id = task.command_id
← cacb456c remove nightly (#1538)
·
back to Exo
·
fix: import ResponsesStreamEvent and DRY up SSE formatting ( aa3f106f →