Merge "HTMLForm: Add HTMLDateTimeField"
[lhc/web/wiklou.git] / includes / jobqueue / aggregator / JobQueueAggregator.php
index bd5c40d..4169974 100644 (file)
@@ -34,7 +34,7 @@ abstract class JobQueueAggregator {
        /**
         * @param array $params
         */
-       protected function __construct( array $params ) {
+       public function __construct( array $params ) {
        }
 
        /**
@@ -142,7 +142,7 @@ abstract class JobQueueAggregator {
        protected function findPendingWikiQueues() {
                global $wgLocalDatabases;
 
-               $pendingDBs = array(); // (job type => (db list))
+               $pendingDBs = []; // (job type => (db list))
                foreach ( $wgLocalDatabases as $db ) {
                        foreach ( JobQueueGroup::singleton( $db )->getQueuesWithJobs() as $type ) {
                                $pendingDBs[$type][] = $db;
@@ -152,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 [];
+       }
+
+       protected function doPurge() {
+               return true;
+       }
+}