As part of T371597: Add a Link (Structured task): Release as "turned off" to German Wikipedia and T370802: Add a link (Structured task): Release as "turned off" to English Wikipedia, we needed to revalidate all link recommendations at enwiki and dewiki. This can be done by running revalidateLinkRecommendations.php. Unfortunately, as of August 2024, this script periodically fails with the following:
Lotteriemonopol is outdated, regenerating... success
Leonidas Proaño is outdated, regenerating... JobQueueError from line 134 of /srv/mediawiki/php-1.43.0-wmf.16/extensions/EventBus/includes/Adapters/JobQueue/JobQueueEventBus.php: Could not enqueue jobs
#0 /srv/mediawiki/php-1.43.0-wmf.16/includes/jobqueue/JobQueue.php(380): MediaWiki\Extension\EventBus\Adapters\JobQueue\JobQueueEventBus->doBatchPush(Array, 0)
#1 /srv/mediawiki/php-1.43.0-wmf.16/includes/jobqueue/JobQueue.php(352): JobQueue->batchPush(Array, 0)
#2 /srv/mediawiki/php-1.43.0-wmf.16/includes/jobqueue/JobQueueGroup.php(157): JobQueue->push(Array)
#3 /srv/mediawiki/php-1.43.0-wmf.16/extensions/CirrusSearch/includes/Updater.php(476): JobQueueGroup->push(Array)
#4 /srv/mediawiki/php-1.43.0-wmf.16/extensions/CirrusSearch/includes/Updater.php(292): CirrusSearch\Updater->pushElasticaWriteJobs('weighted_tags', Array, Object(Closure))
#5 /srv/mediawiki/php-1.43.0-wmf.16/extensions/CirrusSearch/includes/CirrusSearch.php(666): CirrusSearch\Updater->resetWeightedTags(Object(MediaWiki\Page\PageIdentityValue), 'weighted_tags', 'recommendation....')
#6 /srv/mediawiki/php-1.43.0-wmf.16/extensions/GrowthExperiments/includes/NewcomerTasks/AddLink/LinkRecommendationHelper.php(88): CirrusSearch\CirrusSearch->resetWeightedTags(Object(MediaWiki\Page\PageIdentityValue), 'recommendation....')
#7 /srv/mediawiki/php-1.43.0-wmf.16/extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php(205): GrowthExperiments\NewcomerTasks\AddLink\LinkRecommendationHelper->deleteLinkRecommendation(Object(MediaWiki\Page\PageIdentityV
alue), true)
#8 /srv/mediawiki/php-1.43.0-wmf.16/extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php(119): GrowthExperiments\Maintenance\RevalidateLinkRecommendations->regenerateRecommendation(Object(GrowthExperiments\NewcomerTasks\$ddLink\LinkRecommendation))
#9 /srv/mediawiki/php-1.43.0-wmf.16/maintenance/includes/MaintenanceRunner.php(696): GrowthExperiments\Maintenance\RevalidateLinkRecommendations->execute()
#10 /srv/mediawiki/php-1.43.0-wmf.16/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#11 /srv/mediawiki/multiversion/MWScript.php(158): require_once('/srv/mediawiki/...')
#12 {main}Restarting the script is sufficient to make it restart from where it left off, but it requires someone to closely monitor how the script is going, and to restart it if needed (alternatively, a bash script could probably do the same). We should look into why the script is failing to enqueue jobs from time to time.
So far, this looks to be a transient error that just happens occasionally. It might be a good idea to adjust CirrusSearch and/or the MediaWiki-Core-JobQueue system to retry a couple of times when a JobQueueError happens.