-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add bulk cancel functionality for analyses #769
Conversation
Signed-off-by: MiriSafra <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The related issue has not been triaged.
This is a premature optimization and should be closed.
// // @tags tasks | ||
// // @success 202 | ||
// // @router /tasks/{id}/cancel [put] | ||
// // @param id path int true "Task ID" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were the additional //
added? ^
// @description Cancel multiple tasks by IDs. | ||
// @tags tasks | ||
// @success 202 | ||
// @router /tasks/cancel/list [put] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semantically, I think it would be more correct for the PUT to be against the collection because the action is updating the collection. Ex: PUT /tasks/cancel
(without the /list ). The collection implies multiple objects.
Better yet, PUT /tasks/cancel?filter=id:[1,2,3]
. This would be the most RESTful and more powerful. For example, it would support selection of tasks to be canceled by task kind and state. Example: /tasks/cancel?filter=kind:discovery,state=Running
. or all tasks for an application
/tasks/cancel?filter=application.id=44
.
@MiriSafra Thank you for your contribution! |
Added a function for cancelling multiple analyses at once.
Part of: tackle2-ui issue #2153