Merge "Revert "buttons: Update focus for quiet buttons""
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueGroup.php
index 16908a7..b0b35e9 100644 (file)
@@ -104,7 +104,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
         */
@@ -389,6 +389,10 @@ class JobQueueGroup {
                        }
                }
 
+               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 ) {