Skip to content

Commit d4effba

Browse files
committed
Fix double-click required to stop Redis queue workflows
Don't clear the .job_id file immediately after calling cancel_job(). This allows get_workflow_status() to see the "canceled" state and correctly report the workflow as stopped. Previously, clearing the file caused a fallback to PID checking, which showed "running" if commands were still executing. https://claude.ai/code/session_013VFNJ1Sznugpony3r2Mgxt
1 parent 55b461d commit d4effba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/workflow/WorkflowManager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ def stop_workflow(self) -> bool:
184184
if job_id:
185185
success = self._queue_manager.cancel_job(job_id)
186186
if success:
187-
self._queue_manager.clear_job_id(self.workflow_dir)
187+
# Don't clear job_id here - let get_workflow_status() see the
188+
# "canceled" state. The file is cleaned up when the job expires.
188189
return True
189190

190191
# Fallback: stop local process

0 commit comments

Comments
 (0)