File tree Expand file tree Collapse file tree 4 files changed +1
-31
lines changed Expand file tree Collapse file tree 4 files changed +1
-31
lines changed Original file line number Diff line number Diff line change @@ -214,25 +214,6 @@ https_only: false
214
214
# #
215
215
# pool_size: 100
216
216
217
-
218
- # #
219
- # # Max idle size of the HTTP pool used to connect to youtube. Each
220
- # # domain ('youtube.com', 'ytimg.com', ...) has its own pool.
221
- # #
222
- # # This means that when releasing a connection back into the pool, it will
223
- # # be closed if there are already more than idle_pool_size connections within
224
- # # the pool
225
- # #
226
- # # Do note that idle connections are kept around forever without any way of
227
- # # timing them out.
228
- # #
229
- # # When unset this value has the same value as pool_size
230
- # #
231
- # # Accepted values: a positive integer
232
- # # Default: <none> (internally this means that it has the same value as pool_size)
233
- # #
234
- # idle_pool_size:
235
-
236
217
# #
237
218
# # Amount of seconds to wait for a client to be free from the pool
238
219
# # before raising an error
Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ SOFTWARE = {
94
94
95
95
YT_POOL = Invidious ::ConnectionPool ::Pool .new(
96
96
max_capacity: CONFIG .pool_size,
97
- idle_capacity: CONFIG .idle_pool_size,
98
97
timeout: CONFIG .pool_checkout_timeout
99
98
) do
100
99
next make_client(YT_URL , force_resolve: true )
@@ -106,15 +105,13 @@ GGPHT_URL = URI.parse("https://yt3.ggpht.com")
106
105
107
106
GGPHT_POOL = Invidious ::ConnectionPool ::Pool .new(
108
107
max_capacity: CONFIG .pool_size,
109
- idle_capacity: CONFIG .idle_pool_size,
110
108
timeout: CONFIG .pool_checkout_timeout
111
109
) do
112
110
next make_client(GGPHT_URL , force_resolve: true )
113
111
end
114
112
115
113
COMPANION_POOL = Invidious ::ConnectionPool ::Pool .new(
116
114
max_capacity: CONFIG .pool_size,
117
- idle_capacity: CONFIG .idle_pool_size
118
115
) do
119
116
companion = CONFIG .invidious_companion.sample
120
117
next make_client(companion.private_url, use_http_proxy: false )
Original file line number Diff line number Diff line change @@ -160,8 +160,6 @@ class Config
160
160
161
161
# Max pool size for HTTP requests to youtube.com and ytimg.com (each domain has a separate pool)
162
162
property pool_size : Int32 = 100
163
- # Idle pool size for HTTP requests to youtube.com and ytimg.com (each domain has a separate pool)
164
- property idle_pool_size : Int32 ? = nil
165
163
166
164
# Amount of seconds to wait for a client to be free from the pool before rasing an error
167
165
property pool_checkout_timeout : Float64 = 5
Original file line number Diff line number Diff line change @@ -7,18 +7,13 @@ module Invidious::ConnectionPool
7
7
def initialize (
8
8
* ,
9
9
max_capacity : Int32 = 5 ,
10
- idle_capacity : Int32 ? = nil ,
11
10
timeout : Float64 = 5.0 ,
12
11
& client_factory : - > HTTP ::Client
13
12
)
14
- if idle_capacity.nil?
15
- idle_capacity = max_capacity
16
- end
17
-
18
13
pool_options = DB ::Pool ::Options .new(
19
14
initial_pool_size: 0 ,
20
15
max_pool_size: max_capacity,
21
- max_idle_pool_size: idle_capacity ,
16
+ max_idle_pool_size: max_capacity ,
22
17
checkout_timeout: timeout
23
18
)
24
19
@@ -106,7 +101,6 @@ module Invidious::ConnectionPool
106
101
107
102
pool = ConnectionPool ::Pool .new(
108
103
max_capacity: CONFIG .pool_size,
109
- idle_capacity: CONFIG .idle_pool_size,
110
104
timeout: CONFIG .pool_checkout_timeout
111
105
) do
112
106
next make_client(url, force_resolve: true )
You can’t perform that action at this time.
0 commit comments