* Relying on waitForBackups() alone will not work with non DB queues.
Change-Id: I2124c5cd11a70d183cfde00ad21d6642a3a0ee9e
$this->runJobsLog( "Executed $count periodic queue task(s)." );
}
+ $lastTime = time();
do {
$job = ( $type === false )
? $group->pop( JobQueueGroup::TYPE_DEFAULT, JobQueueGroup::USE_CACHE )
break;
}
- // Don't let any slaves/backups fall behind...
+ // Don't let any queue slaves/backups fall behind
$group->get( $job->getType() )->waitForBackups();
+ // Don't let any of the main DB slaves get backed up
+ $timePassed = time() - $lastTime;
+ if ( $timePassed >= 5 || $timePassed < 0 ) {
+ wfWaitForSlaves();
+ }
}
} while ( $job ); // stop when there are no jobs
}