From 6958ea34f24a234510a826b77d2cc35b1f10cb80 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Sun, 25 Mar 2007 16:01:12 +0000 Subject: [PATCH] specify offset for Job::pop(), yay for efficient job queue runs (unless there's a bug somewhere in there :) --- maintenance/runJobs.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"; } -- 2.20.1