feat: add abort button for job cancellation
This commit is contained in:
1 parent
f779f05190
commit
6783ff3970
6 files changed
+54
No files matched your search
@@ -100,6 +100,9 @@ def test_cancel_pending_or_running_job(client):
|
||||
job = job_queue.add_job(video_path="/tmp/test.mp4", model_configs=[])
|
||||
import time
|
||||
time.sleep(0.1)
|
||||
# Force status to RUNNING so cancel succeeds
|
||||
with job_queue._lock:
|
||||
job.status = JobStatus.RUNNING
|
||||
resp = client.post(f"/api/jobs/{job.job_id}/cancel")
|
||||
assert resp.status_code == 200
|
||||
data = resp.get_json()
|
||||
|
||||
Reference in new issue
Block a user