Add ability to cancel batched job spawning #14986
-
The way that batched queue jobs currently work, cancelling a batched job has little or no effect, as the next job is spawned within the cms/src/queue/BaseBatchedJob.php Lines 153 to 160 in 6a13d27 The only way to truly cancel a batched job is to cancel the queue job and kill the process running it. This has resulted in several support requests in which people have been confused about why cancelling long-running, batched queue jobs has no effect. For example:
Source: putyourlightson/craft-blitz#537 (comment)
Source: putyourlightson/craft-blitz#537 (comment) I’m not sure if and how you’d consider addressing this. One option might be to add a check to the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
+1 for this - for large sites this can be problematic. A preflight check as @bencroker suggests sounds like a good idea, or something else that checks whether that 'Release all Jobs' button has been hit since the initial queue request was made. |
Beta Was this translation helpful? Give feedback.
-
Thanks for pointing that out! As of Craft 4.10 and 5.2, batched jobs will start ensuring they are still reserved before moving onto the next step or spawning an additional batch job. (6505856) |
Beta Was this translation helpful? Give feedback.
Thanks for pointing that out! As of Craft 4.10 and 5.2, batched jobs will start ensuring they are still reserved before moving onto the next step or spawning an additional batch job. (6505856)