Merge "Made executeReadyPeriodicTasks avoid using merge() when not needed"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 4 Jun 2014 22:42:57 +0000 (22:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 4 Jun 2014 22:42:57 +0000 (22:42 +0000)
includes/jobqueue/JobQueueGroup.php

index 16908a7..98a78c5 100644 (file)
@@ -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 ) {