From 244e94adfa2af78fd0c0c734d8cbcad5a7993ea4 Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Thu, 24 Aug 2023 12:50:57 +0100 Subject: [PATCH] jobqueue: Deprecate `JobQueueGroup::waitForBackups()` No known usage found per CodeSearch and we should now instead use the equivalent in JobQueue. Change-Id: I7d8fd767153439333080843bcfe40a2267e72c12 --- RELEASE-NOTES-1.41 | 2 ++ includes/jobqueue/JobQueueGroup.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/RELEASE-NOTES-1.41 b/RELEASE-NOTES-1.41 index 4b46595bb3d..1ef43af409f 100644 --- a/RELEASE-NOTES-1.41 +++ b/RELEASE-NOTES-1.41 @@ -499,6 +499,8 @@ because of Phabricator reports. $wgInterwikiCache setting instead. * SiteConfiguration::extractVar() and ::extractGlobal() have been deprecated and also emit deprecation warnings. +* JobQueueGroup::waitForBackups() is deprecated. JobQueue::waitForBackups() + should be used instead. * Hooks::isRegistered(), ::getHandlers(), ::run() and ::runWithoutAbort(), deprecated in 1.35, now emit deprecation warnings. * VirtualRESTService class and its subclasses now emit deprecation warnings diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index 82933e5125c..cdc477aaabd 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -284,9 +284,12 @@ class JobQueueGroup { * * This does nothing for certain queue classes. * + * @deprecated since 1.41, use JobQueue::waitForBackups() instead. + * * @return void */ public function waitForBackups() { + wfDeprecated( __METHOD__, '1.41' ); // Try to avoid doing this more than once per queue storage medium foreach ( $this->jobTypeConfiguration as $type => $conf ) { $this->get( $type )->waitForBackups();