From 2df4cb35478f9946b3538a8b0ddc86b2dfad2124 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 10 Dec 2012 22:53:44 -0800 Subject: [PATCH] [JobQueue] Do not count claimed jobs in isEmpty(). Change-Id: Ie5c14925c8d4797ada970de843091ead269e9ae5 --- includes/job/JobQueueDB.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php index 9b4e500988..4d0f294bc0 100644 --- a/includes/job/JobQueueDB.php +++ b/includes/job/JobQueueDB.php @@ -49,8 +49,8 @@ class JobQueueDB extends JobQueue { return false; } - $found = $this->getSlaveDB()->selectField( - 'job', '1', array( 'job_cmd' => $this->type ), __METHOD__ + $found = $this->getSlaveDB()->selectField( // unclaimed job + 'job', '1', array( 'job_cmd' => $this->type, 'job_token' => '' ), __METHOD__ ); $wgMemc->add( $key, $found ? 'false' : 'true', self::CACHE_TTL ); -- 2.20.1