laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 31 forks source link

[Proposal] A way to determine the number of jobs skipped in a Batch #2634

Open likeadeckofcards opened 3 years ago

likeadeckofcards commented 3 years ago

I am currently using batched queue jobs and adding a history page for a client to see progress. At the moment, if the user were to cancel a job batch from the UI. Eventually, all pending jobs will process, since they have the statement to skip execution. This causes the UI to appear that the batch was completed in terms of progress but the batch was canceled. I am wondering if we could either not decrement the pending jobs when the batch is canceled (I think this seems a little on the messy side) or add another counter column that would track the number of jobs that were skipped due to the batch being canceled.