feat: release 1.1.0 with responsive task control
This commit is contained in:
1 parent
057f0c3050
commit
bfcd828fa8
37 files changed
+1601
-151
No files matched your search
@@ -121,6 +121,20 @@ def batch_detail(batch_id: str):
|
||||
return {**require("batch", batch_id), "jobs": store.jobs(batch_id)}
|
||||
|
||||
|
||||
@router.delete("/batches/{batch_id}")
|
||||
def delete_batch(batch_id: str):
|
||||
try:
|
||||
key = identifier(batch_id)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(400, str(exc)) from exc
|
||||
try:
|
||||
if not store.delete_batch(key):
|
||||
raise HTTPException(404, "批次不存在")
|
||||
except ValueError as exc:
|
||||
raise HTTPException(409, str(exc)) from exc
|
||||
return {"batch_id": key, "status": "deleted"}
|
||||
|
||||
|
||||
@router.post("/batches/{batch_id}/{action}")
|
||||
def batch_action(batch_id: str, action: Literal["pause", "resume", "retry_failed"]):
|
||||
require("batch", batch_id)
|
||||
|
||||
Reference in new issue
Block a user