From e20d18cbf3a1725f0cc2a482954cab81aa17399f Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 10 Mar 2011 02:27:15 +0000 Subject: [PATCH] Stats for duplicate removal --- includes/job/JobQueue.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php index 95f9c777ac..949dfe542d 100644 --- a/includes/job/JobQueue.php +++ b/includes/job/JobQueue.php @@ -82,8 +82,13 @@ abstract class Job { $row->job_id ); $dbw->delete( 'job', $job->insertFields(), __METHOD__ ); + $affected = $dbw->affectedRows(); $dbw->commit(); + if ( $affected ) { + wfIncrStats( 'job-dup-delete', $affected ); + } + wfProfileOut( __METHOD__ ); return $job; } @@ -174,8 +179,13 @@ abstract class Job { // Deadlock prone section $dbw->begin(); $dbw->delete( 'job', $job->insertFields(), __METHOD__ ); + $affected = $dbw->affectedRows(); $dbw->commit(); + if ( $affected ) { + wfIncrStats( 'job-dup-delete', $affected ); + } + wfProfileOut( __METHOD__ ); return $job; } -- 2.20.1