From: Domas Mituzas Date: Sun, 25 Mar 2007 16:01:12 +0000 (+0000) Subject: specify offset for Job::pop(), yay for efficient job queue runs (unless there's a... X-Git-Tag: 1.31.0-rc.0~53620 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=6958ea34f24a234510a826b77d2cc35b1f10cb80;p=lhc%2Fweb%2Fwiklou.git specify offset for Job::pop(), yay for efficient job queue runs (unless there's a bug somewhere in there :) --- diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 7f7ed9a8a0..91168e5967 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -17,9 +17,11 @@ $wgTitle = Title::newFromText( 'RunJobs.php' ); $dbw = wfGetDB( DB_MASTER ); $n = 0; while ( $dbw->selectField( 'job', 'count(*)', '', 'runJobs.php' ) ) { - while ( false != ($job = Job::pop()) ) { + $offset=0; + while ( false != ($job = Job::pop($offset)) ) { wfWaitForSlaves( 5 ); print $job->id . " " . $job->toString() . "\n"; + $offset=$job->id; if ( !$job->run() ) { print "Error: {$job->error}\n"; }