Problem/Motivation
When using the "Override cron queue processing" feature to process queues using ultimate_cron, if the queue worker throws a SuspendQueueException exception the exception is caught in QueueWorker.php (line 117) and does not 'bubble up' which causes the queue to reprocess the item until cron times out, resulting in a flood of the watchdog table and over-processing without an end.
Steps to reproduce
Enable the "Override cron queue processing" and process a queue that throws a SuspendQueueException exception.
Proposed resolution
After catching the SuspendQueueException exception and releasing the item, throw it again so that it is caught and stops the processing of the queue during that cron run.
Remaining tasks
A patch will shortly be attached.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#5 | 3163704-5-rethrow-suspended-queue-exception.patch | 403 bytes | adr_p |
#2 | 3163704-rethrow-suspended-queue-exception.patch | 637 bytes | asak |
Comments
Comment #2
asak CreditAttribution: asak commentedComment #3
andreasderijckeI confirm both the issue and the patch resulting in the expected behaviour.
Comment #4
Berdirwhy create a new exception and not just do throw $e?
Comment #5
adr_p CreditAttribution: adr_p commentedI agree with Berdir, updated the patch.
Comment #7
BerdirThanks, committed. Make sure you create your patches with the a/b prefix so that it can be applied with the default settings of git apply.