You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resaving of a limited amount of objects as a "queue job" leads to self-reproducing endless resaving jobs.
I am unsure if they actually do or resave anything, but they spawn to quick to cancel. Cancelling all jobs has to be timed just right, otherwise a new job will have been queued already, that will not be cancelled. I have only gotten rid of the respawning jobs by spamming the release-all-action in the browser (as that does not seem to be available on the console).
Steps to reproduce
Run craft resave/entries --section <any-section> --limit 1 --queue
Go to the Queue-Manager and wait up to 10 seconds
--offset instead of --limit causes the same behaviour and the amount does not seem to matter for either.
Expected behavior
A job for the resaving of the limited amount of entries to run, with no additional jobs queued.
Actual behavior
New "queue jobs" are added and run indefinitely. In one case it was adding new jobs in a way to block all other jobs.
Craft CMS version
4.4.11
PHP version
8.1.13
Operating system and version
ubuntu 18.04.6
Database type and version
postgres13.8
Image driver and version
No response
Installed plugins and versions
clubstudioltd/craft-asset-rev 7.0.0
craftcms/ckeditor 3.3.0
craftcms/element-api 3.0.1.1
craftcms/feed-me 5.1.2
verbb/super-table 3.0.8.1
The text was updated successfully, but these errors were encountered:
Hi, thanks for reporting! The root cause is the fact that Yii’s ->count() doesn’t take offset and limit into consideration (more info can be found here: yiisoft/yii2#13846).
It caused a situation where, for example, if the section had 3 entries and you set the limit to 1, the total number of items to process was returned as 3, where it should have been 1. This led to an infinite loop when checking if all items were processed. Items processed were less than the total number of items (1 < 3)).
What happened?
Description
Resaving of a limited amount of objects as a "queue job" leads to self-reproducing endless resaving jobs.
I am unsure if they actually do or resave anything, but they spawn to quick to cancel. Cancelling all jobs has to be timed just right, otherwise a new job will have been queued already, that will not be cancelled. I have only gotten rid of the respawning jobs by spamming the
release-all
-action in the browser (as that does not seem to be available on the console).Steps to reproduce
craft resave/entries --section <any-section> --limit 1 --queue
--offset
instead of--limit
causes the same behaviour and the amount does not seem to matter for either.Expected behavior
A job for the resaving of the limited amount of entries to run, with no additional jobs queued.
Actual behavior
New "queue jobs" are added and run indefinitely. In one case it was adding new jobs in a way to block all other jobs.
Craft CMS version
4.4.11
PHP version
8.1.13
Operating system and version
ubuntu 18.04.6
Database type and version
postgres13.8
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: