summaryrefslogtreecommitdiff
path: root/includes/jobqueue/aggregator/JobQueueAggregator.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/jobqueue/aggregator/JobQueueAggregator.php')
-rw-r--r--includes/jobqueue/aggregator/JobQueueAggregator.php28
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