[JobQueue] Added a delayedJobsEnabled() function.
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 25 Apr 2013 21:45:49 +0000 (14:45 -0700)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 29 Apr 2013 04:14:01 +0000 (04:14 +0000)
Change-Id: I7fe6e04aa5c51a61facd5a7327c5544dadb4108b

includes/job/JobQueue.php

index 92bac3f..6bf6f82 100644 (file)
@@ -128,16 +128,30 @@ abstract class JobQueue {
        }
 
        /**
+        * @return bool Whether delayed jobs are enabled
+        * @since 1.22
+        */
+       final public function delayedJobsEnabled() {
+               return $this->checkDelay;
+       }
+
+       /**
+        * Get the allowed queue orders for configuration validation
+        *
         * @return Array Subset of (random, timestamp, fifo, undefined)
         */
        abstract protected function supportedOrders();
 
        /**
+        * Get the default queue order to use if configuration does not specify one
+        *
         * @return string One of (random, timestamp, fifo, undefined)
         */
        abstract protected function optimalOrder();
 
        /**
+        * Find out if delayed jobs are supported for configuration validation
+        *
         * @return boolean Whether delayed jobs are supported
         */
        protected function supportsDelayedJobs() {