imTigger / laravel-job-status

Add ability to track Job progress, status and result dispatched to Queue.
MIT License
407 stars 60 forks source link

Abort/cancel queued jobs #44

Closed gufoe closed 4 years ago

gufoe commented 4 years ago

Hello, I'd like to know if there is a way to cancel a job which has been queued. I would delete the entry from the jobs table, but the job_statuses.job_id is NULL until the job is running, although I've included Imtigger\LaravelJobStatus\LaravelJobStatusServiceProvider::class, in the service providers.

imTigger commented 4 years ago

I am afraid this feature is out of scope of this package. Pulling dispatched job is quite complicated in some queue drivers.

You can use "Improve job_id capture" feature >= 1.0.0 to catch job_id on new jobs. Try if you can use that to pull jobs from your queue driver.