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

Discard jobs that are in progress #180

Closed
salmonsteak1 opened this issue Oct 19, 2024 · 2 comments
Closed

Discard jobs that are in progress #180

salmonsteak1 opened this issue Oct 19, 2024 · 2 comments

Comments

@salmonsteak1
Copy link

Hi, is there any way for us to stop/discard a job that is in progress by a worker? I was looking to do this in the event that there's some problematic jobs that requires manual intervention, and I was thinking to do this through the console helpers. Right now, when I run:

ActiveJob.jobs.in_progress.where(worker_id: 675).discard_all

It gives a UndiscardableError, "Can't discard jobs in progress" error

@rosa
Copy link
Member

rosa commented Oct 19, 2024

Hey @salmonsteak1, this is not yet supported directly from Mission Control, but it'll be for version 1.0. There's some more info here: rails/solid_queue#124 (comment)
In general you can't stop a single job that's already in progress, you'd need to force the worker running it to quit, which would also interrupt any other jobs if you're running more than one thread. In Mission Control you can get information about the worker running a specific job (the host, the PID...) so you can send a QUIT signal to it.

@salmonsteak1
Copy link
Author

Hey, thanks for the quick reply @rosa! Will close the issue

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

No branches or pull requests

2 participants