Merge "Remove "@author Aaron Schulz" annotations"
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueFederated.php
index ecf1a28..7fdd617 100644 (file)
@@ -18,7 +18,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @author Aaron Schulz
  */
 
 /**
@@ -49,7 +48,7 @@
 class JobQueueFederated extends JobQueue {
        /** @var HashRing */
        protected $partitionRing;
-       /** @var array (partition name => JobQueue) reverse sorted by weight */
+       /** @var JobQueue[] (partition name => JobQueue) reverse sorted by weight */
        protected $partitionQueues = [];
 
        /** @var int Maximum number of partitions to try */
@@ -311,18 +310,17 @@ class JobQueueFederated extends JobQueue {
                        throw new MWException( "The given job has no defined partition name." );
                }
 
-               return $this->partitionQueues[$job->metadata['QueuePartition']]->ack( $job );
+               $this->partitionQueues[$job->metadata['QueuePartition']]->ack( $job );
        }
 
        protected function doIsRootJobOldDuplicate( Job $job ) {
-               $params = $job->getRootJobParams();
-               $sigature = $params['rootJobSignature'];
-               $partition = $this->partitionRing->getLiveLocation( $sigature );
+               $signature = $job->getRootJobParams()['rootJobSignature'];
+               $partition = $this->partitionRing->getLiveLocation( $signature );
                try {
                        return $this->partitionQueues[$partition]->doIsRootJobOldDuplicate( $job );
                } catch ( JobQueueError $e ) {
                        if ( $this->partitionRing->ejectFromLiveRing( $partition, 5 ) ) {
-                               $partition = $this->partitionRing->getLiveLocation( $sigature );
+                               $partition = $this->partitionRing->getLiveLocation( $signature );
                                return $this->partitionQueues[$partition]->doIsRootJobOldDuplicate( $job );
                        }
                }
@@ -331,14 +329,13 @@ class JobQueueFederated extends JobQueue {
        }
 
        protected function doDeduplicateRootJob( IJobSpecification $job ) {
-               $params = $job->getRootJobParams();
-               $sigature = $params['rootJobSignature'];
-               $partition = $this->partitionRing->getLiveLocation( $sigature );
+               $signature = $job->getRootJobParams()['rootJobSignature'];
+               $partition = $this->partitionRing->getLiveLocation( $signature );
                try {
                        return $this->partitionQueues[$partition]->doDeduplicateRootJob( $job );
                } catch ( JobQueueError $e ) {
                        if ( $this->partitionRing->ejectFromLiveRing( $partition, 5 ) ) {
-                               $partition = $this->partitionRing->getLiveLocation( $sigature );
+                               $partition = $this->partitionRing->getLiveLocation( $signature );
                                return $this->partitionQueues[$partition]->doDeduplicateRootJob( $job );
                        }
                }