Send job ACKs to statsd
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 11 May 2015 23:55:42 +0000 (16:55 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 11 May 2015 23:55:42 +0000 (16:55 -0700)
Change-Id: Idf6dcd6baf39484ac6fcf14465e13ae12405dd3a

includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueRedis.php

index b1b650b..000fa4f 100644 (file)
@@ -471,6 +471,8 @@ class JobQueueDB extends JobQueue {
                        // Delete a row with a single DELETE without holding row locks over RTTs...
                        $dbw->delete( 'job',
                                array( 'job_cmd' => $this->type, 'job_id' => $job->metadata['id'] ), __METHOD__ );
+
+                       JobQueue::incrStats( 'job-ack', $this->type );
                } catch ( DBError $e ) {
                        $this->throwDBException( $e );
                }
index f1de76c..7edb6ad 100644 (file)
@@ -389,6 +389,8 @@ LUA;
 
                                return false;
                        }
+
+                       JobQueue::incrStats( 'job-ack', $this->type );
                } catch ( RedisException $e ) {
                        $this->throwRedisException( $conn, $e );
                }