Avoid making a derivative request to Special:RunJobs when the job queue is empty
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 8 Apr 2014 16:34:49 +0000 (09:34 -0700)
committerOri Livneh <ori@wikimedia.org>
Thu, 10 Apr 2014 05:49:46 +0000 (22:49 -0700)
commit4865e34630fca77e9b277c015a723b103ba6fb3e
tree6c500bc09d46bdb82d3901fd289e9aea46bcaffe
parent8815c2ddf665ff56c49e916bfaf355858ed47e57
Avoid making a derivative request to Special:RunJobs when the job queue is empty

Checking that the job queue is nonempty is cheap, and when the result is
negative (that is, when the queue is actually empty), it spares from having to
launch a derivative request to Special:RunJobs for job processing. The
derivative request is not cheap, because processing it requires having an
additional full instance of the application. This patch adds the check.

Bug: 60210
Change-Id: Icb95c35f4a8a3c9d4b5aff97fdfabf596d05940a
includes/Wiki.php
includes/jobqueue/JobQueueGroup.php