Allow the number of concurrent connections to be configurable
The MultiHttpClient class allows the user to set the number of concurrent connections it keeps open. This patch simply allows users of the Math extension to set it when connecting to RESTBase. Note that this patch is effectively a no-op, since MultiHttpClient's default is (also) 50. Bug: T132096 Change-Id: If9b6e61ffa23f8d22b3aab874058e809ff4c74b8
This commit is contained in:
parent
6699724d65
commit
d8e172f713
|
@ -151,8 +151,9 @@ class MathRestbaseInterface {
|
|||
}
|
||||
|
||||
private function getServiceClient() {
|
||||
global $wgVirtualRestConfig;
|
||||
$serviceClient = new VirtualRESTServiceClient( new MultiHttpClient( [] ) );
|
||||
global $wgVirtualRestConfig, $wgMathConcurrentReqs;
|
||||
$http = new MultiHttpClient( [ 'maxConnsPerHost' => $wgMathConcurrentReqs ] );
|
||||
$serviceClient = new VirtualRESTServiceClient( $http );
|
||||
if ( isset( $wgVirtualRestConfig['modules']['restbase'] ) ) {
|
||||
$cfg = $wgVirtualRestConfig['modules']['restbase'];
|
||||
$cfg['parsoidCompat'] = false;
|
||||
|
|
|
@ -108,6 +108,7 @@
|
|||
"MathMathMLTimeout": 20,
|
||||
"MathMathMLUrl": "http://mathoid.testme.wmflabs.org",
|
||||
"MathFullRestbaseURL": false,
|
||||
"MathConcurrentReqs": 50,
|
||||
"MathPath": false,
|
||||
"MathTexvcCheckExecutable": false,
|
||||
"MathValidModes": [
|
||||
|
|
Loading…
Reference in New Issue