}
$group = JobQueueGroup::singleton();
-
+
// Flush any pending DB writes for sanity
wfGetLBFactory()->commitAll();
$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