X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobRunner.php;h=676659f384cc9d244f3fed7a339f9a5eb9c7b7cc;hb=b7cc3742f0af9f4d18e0652efb37b63136193ff8;hp=1e8316795c111e54527a349b8f91d93581613267;hpb=578318e68856ef2f5258c67a50d815d06960e206;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php index 1e8316795c..676659f384 100644 --- a/includes/jobqueue/JobRunner.php +++ b/includes/jobqueue/JobRunner.php @@ -131,7 +131,7 @@ class JobRunner implements LoggerAwareInterface { } // Bail out if there is too much DB lag. // This check should not block as we want to try other wiki queues. - list( , $maxLag ) = $lbFactory->getMainLB( wfWikiID() )->getMaxLag(); + list( , $maxLag ) = $lbFactory->getMainLB()->getMaxLag(); if ( $maxLag >= self::MAX_ALLOWED_LAG ) { $response['reached'] = 'replica-lag-limit'; return $response; @@ -290,8 +290,6 @@ class JobRunner implements LoggerAwareInterface { $status = $job->run(); $error = $job->getLastError(); $this->commitMasterChanges( $lbFactory, $job, $fnameTrxOwner ); - // Important: this must be the last deferred update added (T100085, T154425) - DeferredUpdates::addCallableUpdate( [ JobQueueGroup::class, 'pushLazyJobs' ] ); // Run any deferred update tasks; doUpdates() manages transactions itself DeferredUpdates::doUpdates(); } catch ( Exception $e ) { @@ -536,7 +534,7 @@ class JobRunner implements LoggerAwareInterface { $syncThreshold = $this->config->get( 'JobSerialCommitThreshold' ); $time = false; - $lb = $lbFactory->getMainLB( wfWikiID() ); + $lb = $lbFactory->getMainLB(); if ( $syncThreshold !== false && $lb->getServerCount() > 1 ) { // Generally, there is one master connection to the local DB $dbwSerial = $lb->getAnyOpenConnection( $lb->getWriterIndex() );