File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
##### Enhancements
6
6
7
- * None.
7
+ * Add ability to configure max concurrency of CDN requests through environment variable.
8
+ [ maikelvdh] ( https://github.com/maikelvdh )
9
+ [ #773 ] ( https://github.com/CocoaPods/Core/pull/773 )
8
10
9
11
##### Bug Fixes
10
12
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ module Pod
10
10
class CDNSource < Source
11
11
include Concurrent
12
12
13
+ MAX_CONCURRENCY = ( ENV [ 'COCOAPODS_CDN_MAX_CONCURRENCY' ] || 200 ) . to_i
13
14
MAX_NUMBER_OF_RETRIES = ( ENV [ 'COCOAPODS_CDN_MAX_NUMBER_OF_RETRIES' ] || 5 ) . to_i
14
15
# Single thread executor for all network activity.
15
16
HYDRA_EXECUTOR = Concurrent ::SingleThreadExecutor . new
@@ -489,7 +490,7 @@ def concurrent_requests_catching_errors
489
490
end
490
491
491
492
def queue_request ( request )
492
- @hydra ||= Typhoeus ::Hydra . new
493
+ @hydra ||= Typhoeus ::Hydra . new ( :max_concurrency => MAX_CONCURRENCY )
493
494
494
495
# Queue the request into the Hydra (libcurl reactor).
495
496
@hydra . queue ( request )
You can’t perform that action at this time.
0 commit comments