Html: Add buttonAttributes() more diligently
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueFederated.php
index d985d44..ecbb031 100644 (file)
@@ -328,7 +328,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 +373,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 +402,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();