*
* @file
* @defgroup JobQueue JobQueue
- * @author Aaron Schulz
*/
+use MediaWiki\MediaWikiServices;
/**
* Class to handle enqueueing and running of background jobs
public static function incrStats( $key, $type, $delta = 1 ) {
static $stats;
if ( !$stats ) {
- $stats = RequestContext::getMain()->getStats();
+ $stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
}
$stats->updateCount( "jobqueue.{$key}.all", $delta );
$stats->updateCount( "jobqueue.{$key}.{$type}", $delta );