async-http 0.82.1 → 0.82.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a11ccce0d608ca64fbed5c7e5cc23428e25d618f0b6b68aa34e6be7516a6982
4
- data.tar.gz: 890277e43541eaacb5f9f756f697505bcf8443e5aeea7d99b43d23df94896f87
3
+ metadata.gz: ba3cc6cc766d5f45b1480cfaa887ffc1871b7929b679ad49185eb81cfc3f1eb8
4
+ data.tar.gz: 230f4aee8068ed5fe0a2059111f462eeda6278fdd3354c092c5631487a96daa3
5
5
  SHA512:
6
- metadata.gz: 2748cb15c2ae647b7aad72c3151edf747f4c1a366c495c981a0a135d1219b4bccdf5f8433ca44e79d1e92f9e3d4e54a775747df97a0ecede05982e6451f538fb
7
- data.tar.gz: 0647bec2b9b92d5fddbf9ef43bdaa53d626026172d5dc0a922da0716a0c3cde75e8d586a12f79ad851f98994c30c6a1b534e78dd96bd83ee061778ee243cfb41
6
+ metadata.gz: 4b754907b1cf5907481470edb66a6f0d9528ab52f5cddddffdaf7cf61fd17cb6ae8a01629d80e54bfd02ab0469cbc8a14073131be9b0da3f2b443d94ff00e476
7
+ data.tar.gz: c9a55134034af4597e19b317ef42f62f5edc377d5b8a90c1de19a3c3f713ed2c120a939c4cd84c3758de0935e1e6b65a28347db228ed2393925c773bdfff258b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -101,7 +101,7 @@ module Async
101
101
  # As we cache pool, it's possible these pool go bad (e.g. closed by remote host). In this case, we need to try again. It's up to the caller to impose a timeout on this. If this is the last attempt, we force a new connection.
102
102
  connection = @pool.acquire
103
103
 
104
- response = make_response(request, connection)
104
+ response = make_response(request, connection, attempt)
105
105
 
106
106
  # This signals that the ensure block below should not try to release the connection, because it's bound into the response which will be returned:
107
107
  connection = nil
@@ -140,6 +140,36 @@ module Async
140
140
  "#<#{self.class} authority=#{@authority.inspect}>"
141
141
  end
142
142
 
143
+ protected
144
+
145
+ def make_response(request, connection, attempt)
146
+ response = request.call(connection)
147
+
148
+ response.pool = @pool
149
+
150
+ return response
151
+ end
152
+
153
+ def assign_default_tags(tags)
154
+ tags[:endpoint] = @endpoint.to_s
155
+ tags[:protocol] = @protocol.to_s
156
+ end
157
+
158
+ def make_pool(**options)
159
+ if connection_limit = options.delete(:connection_limit)
160
+ warn "The connection_limit: option is deprecated, please use limit: instead.", uplevel: 2
161
+ options[:limit] = connection_limit
162
+ end
163
+
164
+ self.assign_default_tags(options[:tags] ||= {})
165
+
166
+ Async::Pool::Controller.wrap(**options) do
167
+ Console.logger.debug(self) {"Making connection to #{@endpoint.inspect}"}
168
+
169
+ @protocol.client(@endpoint.connect)
170
+ end
171
+ end
172
+
143
173
  Traces::Provider(self) do
144
174
  def call(request)
145
175
  attributes = {
@@ -178,35 +208,15 @@ module Async
178
208
  end
179
209
  end
180
210
  end
181
- end
182
-
183
- protected
184
-
185
- def make_response(request, connection)
186
- response = request.call(connection)
187
-
188
- response.pool = @pool
189
211
 
190
- return response
191
- end
192
-
193
- def assign_default_tags(tags)
194
- tags[:endpoint] = @endpoint.to_s
195
- tags[:protocol] = @protocol.to_s
196
- end
197
-
198
- def make_pool(**options)
199
- if connection_limit = options.delete(:connection_limit)
200
- warn "The connection_limit: option is deprecated, please use limit: instead.", uplevel: 2
201
- options[:limit] = connection_limit
202
- end
203
-
204
- self.assign_default_tags(options[:tags] ||= {})
205
-
206
- Async::Pool::Controller.wrap(**options) do
207
- Console.logger.debug(self) {"Making connection to #{@endpoint.inspect}"}
212
+ def make_response(request, connection, attempt)
213
+ attributes = {
214
+ attempt: attempt,
215
+ }
208
216
 
209
- @protocol.client(@endpoint.connect)
217
+ Traces.trace("async.http.client.make_response", attributes: attributes) do
218
+ super
219
+ end
210
220
  end
211
221
  end
212
222
  end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module HTTP
8
- VERSION = "0.82.1"
8
+ VERSION = "0.82.2"
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.82.1
4
+ version: 0.82.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -58,7 +58,7 @@ cert_chain:
58
58
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
59
59
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
60
60
  -----END CERTIFICATE-----
61
- date: 2024-10-16 00:00:00.000000000 Z
61
+ date: 2024-10-22 00:00:00.000000000 Z
62
62
  dependencies:
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: async
metadata.gz.sig CHANGED
Binary file