diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:31:04 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:58:39 +0200 |
commit | f6d65e533c62f6deb21342d4901ece24497b433e (patch) | |
tree | f28adf0362d14bcd448f7b65a7aaf38650f923aa /includes/jobqueue/aggregator/JobQueueAggregator.php | |
parent | c27b2e832fe25651ef2410fae85b41072aae7519 (diff) |
Update to MediaWiki 1.25.1
Diffstat (limited to 'includes/jobqueue/aggregator/JobQueueAggregator.php')
-rw-r--r-- | includes/jobqueue/aggregator/JobQueueAggregator.php | 28 |
1 files changed, 19 insertions, 9 deletions
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 |