From d515f784e58b0bb7c2cd3d1f844094aafd5bc14a Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 8 Mar 2019 20:19:26 +0100 Subject: [PATCH] Move class JobQueueAggregatorNull to own file Change-Id: Icb76f25eb9c2a26c91ba564a78edd4c07b49b944 --- .phpcs.xml | 1 - autoload.php | 2 +- .../aggregator/JobQueueAggregator.php | 21 ---------- .../aggregator/JobQueueAggregatorNull.php | 42 +++++++++++++++++++ 4 files changed, 43 insertions(+), 23 deletions(-) create mode 100644 includes/jobqueue/aggregator/JobQueueAggregatorNull.php diff --git a/.phpcs.xml b/.phpcs.xml index b877c96647..5a639adb99 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -222,7 +222,6 @@ */includes/gallery/PackedOverlayImageGallery\.php */includes/HistoryBlob\.php */includes/htmlform/HTMLFormElement\.php - */includes/jobqueue/aggregator/JobQueueAggregator\.php */includes/libs/filebackend/FileBackendStore\.php */includes/libs/filebackend/FSFileBackend\.php */includes/libs/filebackend/SwiftFileBackend\.php diff --git a/autoload.php b/autoload.php index fab10fe5d2..be377373e9 100644 --- a/autoload.php +++ b/autoload.php @@ -705,7 +705,7 @@ $wgAutoloadLocalClasses = [ 'Job' => __DIR__ . '/includes/jobqueue/Job.php', 'JobQueue' => __DIR__ . '/includes/jobqueue/JobQueue.php', 'JobQueueAggregator' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregator.php', - 'JobQueueAggregatorNull' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregator.php', + 'JobQueueAggregatorNull' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregatorNull.php', 'JobQueueAggregatorRedis' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php', 'JobQueueConnectionError' => __DIR__ . '/includes/jobqueue/exception/JobQueueConnectionError.php', 'JobQueueDB' => __DIR__ . '/includes/jobqueue/JobQueueDB.php', diff --git a/includes/jobqueue/aggregator/JobQueueAggregator.php b/includes/jobqueue/aggregator/JobQueueAggregator.php index 27ad88e73d..b44fc456ff 100644 --- a/includes/jobqueue/aggregator/JobQueueAggregator.php +++ b/includes/jobqueue/aggregator/JobQueueAggregator.php @@ -157,24 +157,3 @@ abstract class JobQueueAggregator { return $pendingDBs; } } - -/** - * @ingroup JobQueue - */ -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; - } -} diff --git a/includes/jobqueue/aggregator/JobQueueAggregatorNull.php b/includes/jobqueue/aggregator/JobQueueAggregatorNull.php new file mode 100644 index 0000000000..c44d70e07a --- /dev/null +++ b/includes/jobqueue/aggregator/JobQueueAggregatorNull.php @@ -0,0 +1,42 @@ +