mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Use HttpRequestFactory::createMultiClient()
Use the globally configured request timeout instead of MultiHttpClient's hard-coded default. This means that the request timeout for ForeignWikiRequest will typically be reduced from 900s to 25s. Bug: T245170 Depends-On: I8252f6c854b98059f4916d5460ea71cf4b580149 Change-Id: I1c3d96720709253ad15bb8528cdd132571de2e4e
This commit is contained in:
parent
7420a54684
commit
5252624729
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use MediaWiki\Logger\LoggerFactory;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Session\SessionManager;
|
||||
|
||||
class EchoForeignWikiRequest {
|
||||
|
@ -193,7 +194,7 @@ class EchoForeignWikiRequest {
|
|||
* @throws Exception
|
||||
*/
|
||||
protected function doRequests( array $reqs ) {
|
||||
$http = new MultiHttpClient( [] );
|
||||
$http = MediaWikiServices::getInstance()->getHttpRequestFactory()->createMultiClient();
|
||||
$responses = $http->runMulti( $reqs );
|
||||
|
||||
$results = [];
|
||||
|
|
Loading…
Reference in a new issue