+ if ( !$wgCommandLineMode ) {
+ // Send the statsd data post-send on HTTP requests; avoid in CLI mode (T181385)
+ $params['stats'] = $services->getStatsdDataFactory();
+ // Let pre-emptive refreshes happen post-send on HTTP requests
+ $params['asyncHandler'] = [ DeferredUpdates::class, 'addCallableUpdate' ];
+ }