Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/60040


Change subject: Added abandoned job stats.
......................................................................

Added abandoned job stats.

Change-Id: I3ef8c56e1a3e16875c7282afc4d3d0b135bd776d
---
M includes/job/JobQueueDB.php
M includes/job/JobQueueRedis.php
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/60040/1

diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php
index e4825ed..a685fe3 100644
--- a/includes/job/JobQueueDB.php
+++ b/includes/job/JobQueueDB.php
@@ -614,6 +614,7 @@
                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 f083fcc..a55e999 100644
--- a/includes/job/JobQueueRedis.php
+++ b/includes/job/JobQueueRedis.php
@@ -650,6 +650,7 @@
                                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 );

-- 
To view, visit https://gerrit.wikimedia.org/r/60040
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ef8c56e1a3e16875c7282afc4d3d0b135bd776d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to