Merge "CurlHttpRequest: Follow redirects even under open_basedir"
[lhc/web/wiklou.git] / includes / jobqueue / aggregator / JobQueueAggregator.php
index 8600eed..aa02d1f 100644 (file)
@@ -34,7 +34,7 @@ abstract class JobQueueAggregator {
        /**
         * @param array $params
         */
-       protected function __construct( array $params ) {
+       public function __construct( array $params ) {
        }
 
        /**
@@ -73,9 +73,7 @@ abstract class JobQueueAggregator {
         * @return bool Success
         */
        final public function notifyQueueEmpty( $wiki, $type ) {
-               wfProfileIn( __METHOD__ );
                $ok = $this->doNotifyQueueEmpty( $wiki, $type );
-               wfProfileOut( __METHOD__ );
 
                return $ok;
        }
@@ -93,9 +91,7 @@ abstract class JobQueueAggregator {
         * @return bool Success
         */
        final public function notifyQueueNonEmpty( $wiki, $type ) {
-               wfProfileIn( __METHOD__ );
                $ok = $this->doNotifyQueueNonEmpty( $wiki, $type );
-               wfProfileOut( __METHOD__ );
 
                return $ok;
        }
@@ -111,9 +107,7 @@ abstract class JobQueueAggregator {
         * @return array (job type => (list of wiki IDs))
         */
        final public function getAllReadyWikiQueues() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doGetAllReadyWikiQueues();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -129,9 +123,7 @@ abstract class JobQueueAggregator {
         * @return bool Success
         */
        final public function purge() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doPurge();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -160,3 +152,21 @@ abstract class JobQueueAggregator {
                return $pendingDBs;
        }
 }
+
+class JobQueueAggregatorNull extends JobQueueAggregator {
+       protected function doNotifyQueueEmpty( $wiki, $type ) {
+               return true;
+       }
+
+       protected function doNotifyQueueNonEmpty( $wiki, $type ) {
+               return true;
+       }
+
+       protected function doGetAllReadyWikiQueues() {
+               return array();
+       }
+
+       protected function doPurge() {
+               return true;
+       }
+}