*
* @param Job|array $jobs A single Job or a list of Jobs
* @throws MWException
- * @return bool
+ * @return void
*/
public function push( $jobs ) {
$jobs = is_array( $jobs ) ? $jobs : array( $jobs );
if ( !count( $jobs ) ) {
- return true;
+ return;
}
$jobsByType = array(); // (job type => list of jobs)
}
}
- $ok = true;
foreach ( $jobsByType as $type => $jobs ) {
- if ( $this->get( $type )->push( $jobs ) ) {
- JobQueueAggregator::singleton()->notifyQueueNonEmpty( $this->wiki, $type );
- } else {
- $ok = false;
- }
+ $this->get( $type )->push( $jobs );
+ JobQueueAggregator::singleton()->notifyQueueNonEmpty( $this->wiki, $type );
}
if ( $this->cache->has( 'queues-ready', 'list' ) ) {
$this->cache->clear( 'queues-ready' );
}
}
-
- return $ok;
}
/**
/**
* Check if there are any queues with jobs (this is cached)
*
- * @param integer $type JobQueueGroup::TYPE_* constant
+ * @param int $type JobQueueGroup::TYPE_* constant
* @return bool
* @since 1.23
*/
}
/**
- * @param $name string
+ * @param string $name
* @return mixed
*/
private function getCachedConfigVar( $name ) {