From: Tim Starling Date: Thu, 10 Mar 2011 02:27:15 +0000 (+0000) Subject: Stats for duplicate removal X-Git-Tag: 1.31.0-rc.0~31533 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=e20d18cbf3a1725f0cc2a482954cab81aa17399f;p=lhc%2Fweb%2Fwiklou.git Stats for duplicate removal --- 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; }