laravel/ideas

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

likeadeckofcards opened this issue · 0 comments

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.