(but 37072) - infinite loop with runJobs.php
authorAntoine Musso <hashar@free.fr>
Fri, 8 Jun 2012 12:29:43 +0000 (14:29 +0200)
committerAntoine Musso <hashar@free.fr>
Fri, 8 Jun 2012 12:29:43 +0000 (14:29 +0200)
This is similar to fb69ee4 ( https://gerrit.wikimedia.org/r/9116 ) which
fixed nextJobDB.php. This patch make sure runJobs.php does not proceed
jobs listed in $wgJobTypesExcludedFromDefaultQueue , at least not by
default.

We will probably want to factor out common code between runJobs and
nextJobDB.

Change-Id: Id0c8896d7a0d5b58e678db1ce314174d44e1cae3

maintenance/runJobs.php

index 6068311..a75696a 100644 (file)
@@ -61,7 +61,9 @@ class RunJobs extends Maintenance {
                $dbw = wfGetDB( DB_MASTER );
                $n = 0;
                $conds = '';
-               if ( $type !== false ) {
+               if ( $type === false ) {
+                       $conds = Job::defaultQueueConditions( );
+               } else {
                        $conds = "job_cmd = " . $dbw->addQuotes( $type );
                }