From: Aaron Schulz Date: Wed, 4 Jun 2014 18:23:23 +0000 (-0700) Subject: Made executeReadyPeriodicTasks avoid using merge() when not needed X-Git-Tag: 1.31.0-rc.0~15469^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=06116453c0e3b2a77fdf9bd73cdfe487d39f4e45;p=lhc%2Fweb%2Fwiklou.git Made executeReadyPeriodicTasks avoid using merge() when not needed Change-Id: I9bb3a5af6ebd12ac5a31578e17142fb0a2dba029 --- diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index 16908a7a84..98a78c5e39 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -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 ) {