From: Aaron Schulz Date: Fri, 19 Apr 2013 20:06:11 +0000 (-0700) Subject: Added abandoned job stats. X-Git-Tag: 1.31.0-rc.0~19939 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=3f53862f4c7c55f2c2b2ab5501078d4d2b9dffc3;p=lhc%2Fweb%2Fwiklou.git Added abandoned job stats. Change-Id: I3ef8c56e1a3e16875c7282afc4d3d0b135bd776d --- diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php index e4825edc3e..a685fe3505 100644 --- a/includes/job/JobQueueDB.php +++ b/includes/job/JobQueueDB.php @@ -614,6 +614,7 @@ class JobQueueDB extends JobQueue { if ( count( $ids ) ) { $dbw->delete( 'job', array( 'job_id' => $ids ), __METHOD__ ); $count += $dbw->affectedRows(); + JobQueue::incrStats( 'job-abandon', $this->type, $dbw->affectedRows() ); } $dbw->unlock( "jobqueue-recycle-{$this->type}", __METHOD__ ); diff --git a/includes/job/JobQueueRedis.php b/includes/job/JobQueueRedis.php index f083fcc7b6..a55e9996da 100644 --- a/includes/job/JobQueueRedis.php +++ b/includes/job/JobQueueRedis.php @@ -650,6 +650,7 @@ LUA; list( $released, $abandoned, $pruned ) = $res; $count += $released + $pruned; JobQueue::incrStats( 'job-recycle', $this->type, count( $released ) ); + JobQueue::incrStats( 'job-abandon', $this->type, count( $abandoned ) ); } } catch ( RedisException $e ) { $this->throwRedisException( $this->server, $conn, $e );