*
* @param Job|array $jobs A single Job or a list of Jobs
* @throws MWException
- * @return bool
- * @todo Return value here is not useful
+ * @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)
$this->cache->clear( 'queues-ready' );
}
}
-
- return true;
}
/**
}
}
+ if ( $count === 0 ) {
+ return $count; // nothing to update
+ }
+
$wgMemc->merge( $key, function ( $cache, $key, $lastRuns ) use ( $tasksRun ) {
if ( is_array( $lastRuns ) ) {
foreach ( $tasksRun as $type => $tasks ) {