summaryrefslogtreecommitdiff
path: root/maintenance/runJobs.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/runJobs.php')
-rw-r--r--maintenance/runJobs.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php
index 343cda8a..91168e59 100644
--- a/maintenance/runJobs.php
+++ b/maintenance/runJobs.php
@@ -12,15 +12,16 @@ if ( isset( $options['maxjobs'] ) ) {
$maxJobs = 10000;
}
-// Trigger errors on inappropriate use of $wgTitle
-$wgTitle = new FakeTitle;
+$wgTitle = Title::newFromText( 'RunJobs.php' );
-$dbw =& wfGetDB( DB_MASTER );
+$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";
}