summaryrefslogtreecommitdiff
path: root/maintenance/runJobs.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-09-14 13:18:58 +0200
committerPierre Schmitz <pierre@archlinux.de>2007-09-14 13:18:58 +0200
commit8f416baead93a48e5799e44b8bd2e2c4859f4e04 (patch)
treecd47ac55eb80a39e3225e8b4f3161b88ea16c2cf /maintenance/runJobs.php
parentd7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff)
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'maintenance/runJobs.php')
-rw-r--r--maintenance/runJobs.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php
index 91168e59..4539be05 100644
--- a/maintenance/runJobs.php
+++ b/maintenance/runJobs.php
@@ -12,13 +12,28 @@ if ( isset( $options['maxjobs'] ) ) {
$maxJobs = 10000;
}
+$type = false;
+if ( isset( $options['type'] ) )
+ $type = $options['type'];
+
$wgTitle = Title::newFromText( 'RunJobs.php' );
$dbw = wfGetDB( DB_MASTER );
$n = 0;
-while ( $dbw->selectField( 'job', 'count(*)', '', 'runJobs.php' ) ) {
+$conds = array();
+if ($type !== false)
+ $conds = array('job_cmd' => $type);
+
+while ( $dbw->selectField( 'job', 'count(*)', $conds, 'runJobs.php' ) ) {
$offset=0;
- while ( false != ($job = Job::pop($offset)) ) {
+ for (;;) {
+ $job = ($type == false) ?
+ Job::pop($offset, $type)
+ : Job::pop_type($type);
+
+ if ($job == false)
+ break;
+
wfWaitForSlaves( 5 );
print $job->id . " " . $job->toString() . "\n";
$offset=$job->id;
@@ -30,4 +45,4 @@ while ( $dbw->selectField( 'job', 'count(*)', '', 'runJobs.php' ) ) {
}
}
}
-?>
+