Skip to content

Conversation

@MiriSafra
Copy link
Contributor

@MiriSafra MiriSafra commented Dec 8, 2024

Added a function for cancelling multiple analyses at once.
Part of: tackle2-ui issue #2153

@MiriSafra MiriSafra changed the title ✨Add bulk cancel functionality for analyses ✨ Add bulk cancel functionality for analyses Dec 8, 2024
Copy link
Contributor

@jortel jortel left a 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"
Copy link
Contributor

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]
Copy link
Contributor

@jortel jortel Jan 16, 2025

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.

@jortel
Copy link
Contributor

jortel commented Jan 17, 2025

@MiriSafra Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants