Background
...
Add the following fields to Submission Status:
Submission Status |
---|
currentFields |
canCancel : Boolean (Default FALSE) |
cancelRequested : Boolean (Default FALSE) |
When the queue's Application starts the running process, it would change canCancel to TRUE.
Add an API that allows user to request to cancel their submissions:
Action | Intended Users | URI | Method | Request Params | Request Body | Response Body |
---|---|---|---|---|---|---|
Request to Cancel a Submission | The user who submitted the Submission | /submission/{submissionId}/cancelRequest | PUT | None | None | None |
When a user make such request, we will check for:
- Is the user who making the request submitted the submission?
- Is canCancel's value for the request submission TRUE?
If both conditions are met, we will set the cancelRequested value to TRUE and return 200. We will throw an appropriate 400 status code for error.
The queue's Application are responsible to check for cancelRequested value and update SubmissionStatus appropriately.
Service Layer
Add a new boolean field to submission status called 'cancelRequested'.
...
Add a leaderboard widget, including an executionStatus column. The query should use 'where userId==@CURRENT_USER' to show just the submitter's jobs.
Choose the 'stop button' renderer for this column.
...