Avoid calling recyclePruneAndUndelayJobs() in daemonized mode
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 19 Oct 2014 01:11:53 +0000 (18:11 -0700)
committerOri.livneh <ori@wikimedia.org>
Mon, 20 Oct 2014 20:37:32 +0000 (20:37 +0000)
* This could cause problems if claimTTL is 0 in MW config but not
  in the runner JSON config.

Change-Id: I86418fd4426b58be1c17c97e026d14239f5e36de

includes/jobqueue/JobQueueRedis.php

index 3ac5cf4..b87c678 100644 (file)
@@ -295,7 +295,7 @@ LUA;
 
                // Push ready delayed jobs into the queue every 10 jobs to spread the load.
                // This is also done as a periodic task, but we don't want too much done at once.
-               if ( $this->checkDelay && mt_rand( 0, 9 ) == 0 ) {
+               if ( !$this->daemonized && $this->checkDelay && mt_rand( 0, 9 ) == 0 ) {
                        $this->recyclePruneAndUndelayJobs();
                }