From 06116453c0e3b2a77fdf9bd73cdfe487d39f4e45 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 4 Jun 2014 11:23:23 -0700 Subject: [PATCH] Made executeReadyPeriodicTasks avoid using merge() when not needed Change-Id: I9bb3a5af6ebd12ac5a31578e17142fb0a2dba029 --- includes/jobqueue/JobQueueGroup.php | 4 ++++ 1 file changed, 4 insertions(+) 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 ) { -- 2.20.1