From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- .../jobqueue/aggregator/JobQueueAggregator.php | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'includes/jobqueue/aggregator/JobQueueAggregator.php') diff --git a/includes/jobqueue/aggregator/JobQueueAggregator.php b/includes/jobqueue/aggregator/JobQueueAggregator.php index 8600eed9..febc277a 100644 --- a/includes/jobqueue/aggregator/JobQueueAggregator.php +++ b/includes/jobqueue/aggregator/JobQueueAggregator.php @@ -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; + } +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf