- Issue created by @hchonov
- Status changed to Needs review
over 1 year ago 1:01pm 23 May 2023 - Open on Drupal.org โCore: 10.0.7 + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - ๐ฉ๐ชGermany a.dmitriiev
I guess it is better to check the exception status code, like
$e->getCode() == 429
instead of doing regular expression match on the message, this will be a bit easier. - ๐ฉ๐ชGermany a.dmitriiev
And I think it is better to re-queue the items instead of do sleep inside this method from patch. Check queuer plugin, e.g. this one from purge module
purge/modules/purge_queuer_coretags/src/Plugin/Purge/Queuer/CoreTagsQueuer.php
, it is used in this servicepurge/modules/purge_queuer_coretags/src/CacheTagsQueuer.php
. I think it is better to create some RetryQueuer plugin and just add failed invalidations back to the queue - Status changed to Needs work
over 1 year ago 4:03pm 25 May 2023 - ๐ฉ๐ชGermany hchonov ๐ช๐บ๐ฉ๐ช๐ง๐ฌ
I guess it is better to check the exception status code, like $e->getCode() == 429 instead of doing regular expression match on the message, this will be a bit easier.
oh, I was thinking to add the check for the code, so it looks like I've missed this. But checking the error message is needed to get the seconds needed to wait.
And I think it is better to re-queue the items instead of do sleep inside this method from patch. Check queuer plugin, e.g. this one from purge module purge/modules/purge_queuer_coretags/src/Plugin/Purge/Queuer/CoreTagsQueuer.php, it is used in this service purge/modules/purge_queuer_coretags/src/CacheTagsQueuer.php. I think it is better to create some RetryQueuer plugin and just add failed invalidations back to the queue
Of course, if it was using a queue, which is not the case if the API is invoked directly through a drush command.
- ๐ฉ๐ชGermany a.dmitriiev
All purging is done through the queue even the one that is invoked from drush command. I assume the fix from this patch should be enough. The queue item will be set to Failed, and according to QueueService "Failed" items go back to the queue automatically.
- Status changed to Needs review
over 1 year ago 7:41am 19 June 2023 - Open on Drupal.org โCore: 10.0.7 + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org โCore: 10.0.7 + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass -
a.dmitriiev โ
committed 23cd7b09 on 8.x-1.x authored by
hchonov โ
Issue #3362134 by hchonov, a.dmitriiev: Gracefully handle 429 Too Many...
-
a.dmitriiev โ
committed 23cd7b09 on 8.x-1.x authored by
hchonov โ
- Status changed to Fixed
over 1 year ago 10:21am 18 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.