diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /includes/jobqueue/aggregator/JobQueueAggregator.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
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 |