Lowered $maxAllowedLag to 3 in JobRunner
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 22 Apr 2015 13:11:25 +0000 (06:11 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 22 Apr 2015 13:11:25 +0000 (06:11 -0700)
Change-Id: I7cb771c667bac21e9b67069e31c6243d9314dac5

includes/jobqueue/JobRunner.php

index d5262a1..85f9c2c 100644 (file)
@@ -123,8 +123,8 @@ class JobRunner implements LoggerAwareInterface {
                $trxProfiler->setExpectation( 'maxAffected', 500, __METHOD__ );
 
                // Bail out if there is too much DB lag
-               $maxAllowedLag = 5;
-               list( , $maxLag ) = wfGetLBFactory()->getMainLB( wfWikiID() )->getMaxLag();
+               $maxAllowedLag = 3;
+               list( , $maxLag ) = wfGetLB( wfWikiID() )->getMaxLag();
                if ( $maxLag >= $maxAllowedLag ) {
                        $response['reached'] = 'slave-lag-limit';
                        return $response;