blob: d72addc7697b164a86924ce06ac1a22b7cd998bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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";
}
}
}
?>
|