From: Aaron Schulz Date: Tue, 11 Dec 2012 06:53:44 +0000 (-0800) Subject: [JobQueue] Do not count claimed jobs in isEmpty(). X-Git-Tag: 1.31.0-rc.0~21333 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=2df4cb35478f9946b3538a8b0ddc86b2dfad2124;p=lhc%2Fweb%2Fwiklou.git [JobQueue] Do not count claimed jobs in isEmpty(). Change-Id: Ie5c14925c8d4797ada970de843091ead269e9ae5 --- 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 );