X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobRunner.php;h=e9ae30e1e008ff868848515847f09c950372edc4;hb=7ea13643f5884dcfb2a8b4e22ae45858a81940b6;hp=94254239c10a8eff53b540e3d8c4b6d7c59f1ce4;hpb=b40158b77b483ba6b8bce6564ea2fb643dc6d45b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php index 94254239c1..e9ae30e1e0 100644 --- a/includes/jobqueue/JobRunner.php +++ b/includes/jobqueue/JobRunner.php @@ -88,7 +88,7 @@ class JobRunner implements LoggerAwareInterface { * @return array Summary response that can easily be JSON serialized */ public function run( array $options ) { - global $wgJobClasses; + global $wgJobClasses, $wgTrxProfilerLimits; $response = array( 'jobs' => array(), 'reached' => 'none-ready' ); @@ -120,7 +120,7 @@ class JobRunner implements LoggerAwareInterface { // Catch huge single updates that lead to slave lag $trxProfiler = Profiler::instance()->getTransactionProfiler(); $trxProfiler->setLogger( LoggerFactory::getInstance( 'DBPerformance' ) ); - $trxProfiler->setExpectation( 'maxAffected', 500, __METHOD__ ); + $trxProfiler->setExpectations( $wgTrxProfilerLimits['JobRunner'], __METHOD__ ); // Bail out if there is too much DB lag. // This check should not block as we want to try other wiki queues.