django-rq icon indicating copy to clipboard operation
django-rq copied to clipboard

How to stop/terminate a long-running job. Deleting the job doesn't do the trick

Open gabriels1234 opened this issue 2 years ago • 2 comments
trafficstars

Hi,

I was wondering if django-rq provides a way to "terminate" a running job. For Jobs that take hours, deleting the job would not make the trick. or is it that it's a limitation from RQ?

Thanks!

gabriels1234 avatar Feb 27 '23 19:02 gabriels1234

Any guesses? @selwin Should I investigate and try to make it happen if possible? (i.e adding an option to "stop/terminate" a job?)

gabriels1234 avatar Mar 10 '23 14:03 gabriels1234

@gabriels1234 sorry I just saw this. RQ actually provides a way to stop a job that's currently executing. https://python-rq.org/docs/jobs/#stopping-a-currently-executing-job

My advice would be to add a button to send a stop job command in job/worker detail page.

selwin avatar Mar 10 '23 15:03 selwin