Replace deprecated Context::getStats() with MWServices::getStatsdDataFactory()

Change-Id: If7ef514b625e67268d524477ac43ad9bc3dcae5f
This commit is contained in:
WMDE-Fisch 2017-03-17 12:19:32 +01:00
parent ff888f3b44
commit 9053906f33

View file

@ -9,6 +9,7 @@
*/
use \MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
class ApiVisualEditorEdit extends ApiVisualEditor {
@ -176,7 +177,9 @@ class ApiVisualEditorEdit extends ApiVisualEditor {
$logger = LoggerFactory::getInstance( 'StashEdit' );
$logger->debug( "Cached parser output for VE content key '$key'." );
}
$this->getStats()->increment( "editstash.ve_cache_stores.$status" );
MediaWikiServices::getInstance()->getStatsdDataFactory()->increment(
"editstash.ve_cache_stores.$status"
);
return $hash;
}