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

Stopping in progress job #256

Closed
luigi7up opened this issue Jul 12, 2024 · 3 comments
Closed

Stopping in progress job #256

luigi7up opened this issue Jul 12, 2024 · 3 comments

Comments

@luigi7up
Copy link

I hope this message finds you well.

I am currently facing a challenge with stopping in-progress jobs in Solid Queue and would appreciate your guidance on this matter.

In my use case, I have built a scraper that uses a proxy service with bandwidth that incurs costs. Although my job is not failing, it occasionally gets stuck in a loop due to a bug, leading to continuous connections to the proxy and unnecessary bandwidth consumption. This is becoming quite costly.

I have tried to find a way to gracefully stop an in-progress job, but I haven't found a solution, even in Mission Control. I suspect this might be by design, but not being able to stop a job is problematic in my scenario.

Could you please provide the best approach to gracefully stop an in-progress job.

By the way I'm running it all on Digital Ocean's app platform if that makes any difference

Thank you so much

@sebglazebrook
Copy link

+1 to the above. Looking for the most supported way to do this that isn't killing the workers :-)

@rosa
Copy link
Member

rosa commented Jul 15, 2024

Hey @luigi7up! Right now, the only way to stop an in-progress job is to send a QUIT signal to the worker running the job. You can check this in Mission Control. The worker should show the hostname where it's running and its pid, so you can use that to send the signal. The worker will exit! when it receives the QUIT signal, killing its thread pool. Other jobs being run by that worker (if you're running a number of threads > 1) will also be killed. One thing to note is that the jobs will eventually be automatically released back to the queue and will be picked up again by another worker.

Check also #124.

@rosa
Copy link
Member

rosa commented Jul 30, 2024

Going to close this one in favour of #124

@rosa rosa closed this as completed Jul 30, 2024
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

3 participants