feat(api): 支持取消本地排队任务

This commit is contained in:
chengcheng
2026-06-09 19:09:20 +08:00
parent a8fa8dd212
commit e8df26da9b
6 changed files with 319 additions and 0 deletions
@@ -146,6 +146,14 @@ type TaskAcceptedResponse struct {
Next TaskNextLinks `json:"next"`
}
type TaskCancelResponse struct {
TaskID string `json:"taskId" example:"9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25"`
Cancelled bool `json:"cancelled" example:"false"`
Cancellable bool `json:"cancellable" example:"false"`
Submitted bool `json:"submitted" example:"true"`
Message string `json:"message" example:"任务已提交上游,当前不可取消,请继续查询结果"`
}
type TaskNextLinks struct {
Events string `json:"events" example:"/api/v1/tasks/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25/events"`
Detail string `json:"detail" example:"/api/v1/tasks/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25"`