MediaWiki: Avoid usage of deprecated JobQueueGroup::singleton()
Make use of the `JobQueueGroupFactory` service provisioned in 1.37 Change-Id: I12fe943fc1e62402dcfb7d0f66495fdbc76d751d
This commit is contained in:
parent
882bb03ed0
commit
65e6fa5c43
1 changed files with 3 additions and 3 deletions
|
|
@ -1189,8 +1189,9 @@ class MediaWiki {
|
|||
* @return bool Success
|
||||
*/
|
||||
private function triggerAsyncJobs( $n, LoggerInterface $runJobsLogger ) {
|
||||
$services = MediaWikiServices::getInstance();
|
||||
// Do not send request if there are probably no jobs
|
||||
$group = JobQueueGroup::singleton();
|
||||
$group = $services->getJobQueueGroupFactory()->makeJobQueueGroup();
|
||||
if ( !$group->queuesHaveJobs( JobQueueGroup::TYPE_DEFAULT ) ) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1225,8 +1226,7 @@ class MediaWiki {
|
|||
|
||||
$invokedWithSuccess = true;
|
||||
if ( $sock ) {
|
||||
$special = MediaWikiServices::getInstance()->getSpecialPageFactory()->
|
||||
getPage( 'RunJobs' );
|
||||
$special = $services->getSpecialPageFactory()->getPage( 'RunJobs' );
|
||||
$url = $special->getPageTitle()->getCanonicalURL( $query );
|
||||
$req = (
|
||||
"POST $url HTTP/1.1\r\n" .
|
||||
|
|
|
|||
Loading…
Reference in a new issue