* This might be useful for improving concurrency for job acquisition.
* - claimTTL : If supported, the queue will recycle jobs that have been popped
* but not acknowledged as completed after this many seconds. Recycling
- * of jobs simple means re-inserting them into the queue. Jobs can be
+ * of jobs simply means re-inserting them into the queue. Jobs can be
* attempted up to three times before being discarded.
*
* Queue classes should throw an exception if they do not support the options given.
// Flag this job as an old duplicate based on its "root" job...
try {
if ( $job && $this->isRootJobOldDuplicate( $job ) ) {
- JobQueue::incrStats( 'job-pop-duplicate', $this->type );
+ JobQueue::incrStats( 'dupe_pops', $this->type );
$job = DuplicateJob::newFromJob( $job ); // convert to a no-op
}
} catch ( Exception $e ) {
* @since 1.22
*/
final public function getSiblingQueuesWithJobs( array $types ) {
-
return $this->doGetSiblingQueuesWithJobs( $types );
}
* @since 1.22
*/
final public function getSiblingQueueSizes( array $types ) {
-
return $this->doGetSiblingQueueSizes( $types );
}
* @since 1.22
*/
public static function incrStats( $key, $type, $delta = 1 ) {
- wfIncrStats( $key, $delta );
- wfIncrStats( "{$key}-{$type}", $delta );
+ static $stats;
+ if ( !$stats ) {
+ $stats = RequestContext::getMain()->getStats();
+ }
+ $stats->updateCount( "jobqueue.{$key}.all", $delta );
+ $stats->updateCount( "jobqueue.{$key}.{$type}", $delta );
}
/**