summaryrefslogtreecommitdiff
path: root/maintenance/runJobs.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/runJobs.php')
-rw-r--r--maintenance/runJobs.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php
new file mode 100644
index 00000000..d72addc7
--- /dev/null
+++ b/maintenance/runJobs.php
@@ -0,0 +1,20 @@
+<?php
+
+require_once( 'commandLine.inc' );
+require_once( "$IP/includes/JobQueue.php" );
+require_once( "$IP/includes/FakeTitle.php" );
+
+// Trigger errors on inappropriate use of $wgTitle
+$wgTitle = new FakeTitle;
+
+$dbw =& wfGetDB( DB_MASTER );
+while ( $dbw->selectField( 'job', 'count(*)', '', 'runJobs.php' ) ) {
+ while ( false != ($job = Job::pop()) ) {
+ wfWaitForSlaves( 5 );
+ print $job->id . " " . $job->toString() . "\n";
+ if ( !$job->run() ) {
+ print "Error: {$job->error}\n";
+ }
+ }
+}
+?>