X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobRunner.php;h=3982134b6be5ce5606c97a0df5d2b963ab072a12;hb=b95d41c62b9ba913f9f96388a9f9a39061aa6a19;hp=efc36cc4c385863ef625cfb4e9db6a6f110dcd7a;hpb=a07ea9326e540e7b7b54685a0dff796cd9e9572f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php index efc36cc4c3..3982134b6b 100644 --- a/includes/jobqueue/JobRunner.php +++ b/includes/jobqueue/JobRunner.php @@ -126,7 +126,7 @@ class JobRunner implements LoggerAwareInterface { } $group = JobQueueGroup::singleton(); - + // Flush any pending DB writes for sanity wfGetLBFactory()->commitAll(); @@ -199,10 +199,12 @@ class JobRunner implements LoggerAwareInterface { $timeMsTotal += $timeMs; $profiler->scopedProfileOut( $psection ); - if ( $job->getQueuedTimestamp() ) { + $readyTs = $job->getReadyTimestamp(); + if ( $readyTs ) { // Record time to run for the job type - $stats->timing( "job-pickuptime-$jType", - $popTime - $job->getQueuedTimestamp() ); + $pickupDelay = $popTime - $readyTs; + $stats->timing( 'jobqueue.pickup_delay.all', $pickupDelay ); + $stats->timing( "jobqueue.pickup_delay.$jType", $pickupDelay ); } // Mark the job as done on success or when the job cannot be retried