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/JobQueueGroup.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/jobqueue/JobQueueGroup.php')
-rw-r--r-- | includes/jobqueue/JobQueueGroup.php | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index 98a78c5e..ebd547a0 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -94,6 +94,7 @@ class JobQueueGroup { } else { $conf = $conf + $wgJobTypeConf['default']; } + $conf['aggregator'] = JobQueueAggregator::singleton(); return JobQueue::factory( $conf ); } @@ -104,7 +105,7 @@ class JobQueueGroup { * This inserts the jobs into the queue specified by $wgJobTypeConf * and updates the aggregate job queue information cache as needed. * - * @param Job|array $jobs A single Job or a list of Jobs + * @param Job|Job[] $jobs A single Job or a list of Jobs * @throws MWException * @return void */ @@ -125,7 +126,6 @@ class JobQueueGroup { foreach ( $jobsByType as $type => $jobs ) { $this->get( $type )->push( $jobs ); - JobQueueAggregator::singleton()->notifyQueueNonEmpty( $this->wiki, $type ); } if ( $this->cache->has( 'queues-ready', 'list' ) ) { @@ -153,9 +153,6 @@ class JobQueueGroup { if ( is_string( $qtype ) ) { // specific job type if ( !in_array( $qtype, $blacklist ) ) { $job = $this->get( $qtype )->pop(); - if ( !$job ) { - JobQueueAggregator::singleton()->notifyQueueEmpty( $this->wiki, $qtype ); - } } } else { // any job in the "default" jobs types if ( $flags & self::USE_CACHE ) { @@ -179,7 +176,6 @@ class JobQueueGroup { if ( $job ) { // found break; } else { // not found - JobQueueAggregator::singleton()->notifyQueueEmpty( $this->wiki, $type ); $this->cache->clear( 'queues-ready' ); } } @@ -220,12 +216,10 @@ class JobQueueGroup { public function waitForBackups() { global $wgJobTypeConf; - wfProfileIn( __METHOD__ ); // Try to avoid doing this more than once per queue storage medium foreach ( $wgJobTypeConf as $type => $conf ) { $this->get( $type )->waitForBackups(); } - wfProfileOut( __METHOD__ ); } /** @@ -383,10 +377,6 @@ class JobQueueGroup { } } } - // The tasks may have recycled jobs or release delayed jobs into the queue - if ( isset( $tasksRun[$type] ) && !$queue->isEmpty() ) { - JobQueueAggregator::singleton()->notifyQueueNonEmpty( $this->wiki, $type ); - } } if ( $count === 0 ) { |