* 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
*/
}
}
+ 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 ) {