Skip to content
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

Ability to cancel/delete Jobs #614

Closed
michaelbromley opened this issue Jan 4, 2021 · 1 comment
Closed

Ability to cancel/delete Jobs #614

michaelbromley opened this issue Jan 4, 2021 · 1 comment

Comments

@michaelbromley
Copy link
Member

Is your feature request related to a problem? Please describe.
Sometimes you want to cancel a Job which is running in the JobQueue. This may be because it is not needed and takes up too many resources, or because it got into a bad state and just needs purging.

Describe the solution you'd like
A new mutation, e.g. cancelJob or deleteJob. Not sure if 2 separate mutations are needed yet - needs more research.

@michaelbromley
Copy link
Member Author

Done a bit more digging here. Here's a real scenario that I have right now (and have had reported too by users on Slack):

A particular job in the queue gets stuck in the RUNNING state. This probably occurs due to it being running when the server is shut down, and for some reason the teardown logic is not being completed (which is supposed to set all RUNNING jobs back to PENDING).

Henceforth the job is listed as running (e.g. in the Admin UI) with no way to cancel or remove short of physically deleting the job from storage (e.g. deleting the row in the DB table).

I think we only need a cancelJob mutation, since "deletion" is already handled by the existing removeSettledJobs mutation (cancelled jobs would also be considered settled).

michaelbromley added a commit that referenced this issue Jan 7, 2021
michaelbromley added a commit that referenced this issue Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant