Merge "Adding a few tests for categories"
[lhc/web/wiklou.git] / maintenance / runJobs.php
index 946ee2b..e909bc0 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 /**
- * This script starts pending jobs.
+ * Run pending jobs.
  *
- * Usage:
+ * Options:
  *  --maxjobs <num> (default 10000)
  *  --type <job_cmd>
  *
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
+/**
+ * Maintenance script that runs pending jobs.
+ *
+ * @ingroup Maintenance
+ */
 class RunJobs extends Maintenance {
        public function __construct() {
                parent::__construct();
@@ -37,6 +43,9 @@ class RunJobs extends Maintenance {
        }
 
        public function memoryLimit() {
+               if ( $this->hasOption( 'memory-limit' ) ) {
+                       return parent::memoryLimit();
+               }
                // Don't eat all memory on the machine if we get a bad job.
                return "150M";
        }