diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
commit | a2190ac74dd4d7080b12bab90e552d7aa81209ef (patch) | |
tree | 8b31f38de9882d18df54cf8d9e0de74167a094eb /includes/jobqueue/JobQueueFederated.php | |
parent | 15e69f7b20b6596b9148030acce5b59993b95a45 (diff) | |
parent | 257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff) |
Merge branch 'mw-1.26'
Diffstat (limited to 'includes/jobqueue/JobQueueFederated.php')
-rw-r--r-- | includes/jobqueue/JobQueueFederated.php | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/includes/jobqueue/JobQueueFederated.php b/includes/jobqueue/JobQueueFederated.php index d985d449..109ca019 100644 --- a/includes/jobqueue/JobQueueFederated.php +++ b/includes/jobqueue/JobQueueFederated.php @@ -93,6 +93,8 @@ class JobQueueFederated extends JobQueue { ) { unset( $baseConfig[$o] ); // partition queue doesn't care about this } + // The class handles all aggregator calls already + unset( $baseConfig['aggregator'] ); // Get the partition queue objects foreach ( $partitionMap as $partition => $w ) { if ( !isset( $params['configByPartition'][$partition] ) ) { @@ -328,7 +330,7 @@ class JobQueueFederated extends JobQueue { return false; } - protected function doDeduplicateRootJob( Job $job ) { + protected function doDeduplicateRootJob( IJobSpecification $job ) { $params = $job->getRootJobParams(); $sigature = $params['rootJobSignature']; $partition = $this->partitionRing->getLiveLocation( $sigature ); @@ -373,27 +375,7 @@ class JobQueueFederated extends JobQueue { $this->throwErrorIfAllPartitionsDown( $failed ); } - protected function doGetPeriodicTasks() { - $tasks = array(); - /** @var JobQueue $queue */ - foreach ( $this->partitionQueues as $partition => $queue ) { - foreach ( $queue->getPeriodicTasks() as $task => $def ) { - $tasks["{$partition}:{$task}"] = $def; - } - } - - return $tasks; - } - protected function doFlushCaches() { - static $types = array( - 'empty', - 'size', - 'acquiredcount', - 'delayedcount', - 'abandonedcount' - ); - /** @var JobQueue $queue */ foreach ( $this->partitionQueues as $queue ) { $queue->doFlushCaches(); @@ -422,6 +404,17 @@ class JobQueueFederated extends JobQueue { return $iterator; } + public function getAllAcquiredJobs() { + $iterator = new AppendIterator(); + + /** @var JobQueue $queue */ + foreach ( $this->partitionQueues as $queue ) { + $iterator->append( $queue->getAllAcquiredJobs() ); + } + + return $iterator; + } + public function getAllAbandonedJobs() { $iterator = new AppendIterator(); |