patient_http 1.1.0 → 1.1.1
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/lib/patient_http/processor.rb +11 -0
- data/lib/patient_http.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dbb8a32f746745abcfd6728c31f6460793440abc3b5bf42f4e0702b7cdd2987e
|
|
4
|
+
data.tar.gz: 482823627d13df33a1a262341c2dd2f8512d466f595edbb2414c573d96d7cd8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e31bfe3ec727df7c534a93b74c4bb66ee36e45b5ba587fb11751198f360d82d9d0ca01ac43c186244bf5b125f73cfb7588e1e438508124f0c25000bdb7b3e42
|
|
7
|
+
data.tar.gz: 573b8de414ef3ca0251b7cbb946c33f7e9a4a24eeefa1f54823f8c86454243998a3517935f8dc9612c4f61bcc4a1d7d778d7df5ab74c33cbaad47614d26cf96a
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## 1.1.1
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Connection pools are now closed gracefully inside the reactor during shutdown. Previously the reactor stopped with open pools, causing async-pool to force-cancel each connection pool's background gardener task mid-wait and emit a noisy (but harmless) `ThreadError: Attempt to unlock a mutex which is not locked` warning when the process was killed.
|
|
12
|
+
|
|
7
13
|
## 1.1.0
|
|
8
14
|
|
|
9
15
|
### Added
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.1
|
|
@@ -328,6 +328,17 @@ module PatientHttp
|
|
|
328
328
|
@config.logger&.info("[PatientHttp] Reactor received stop signal")
|
|
329
329
|
rescue => e
|
|
330
330
|
@config.logger&.error("[PatientHttp] Reactor loop error: #{e.inspect}\n#{e.backtrace.join("\n")}")
|
|
331
|
+
ensure
|
|
332
|
+
# Close the HTTP connection pools while still inside the reactor so the
|
|
333
|
+
# pools' background gardener tasks shut down gracefully. Otherwise the
|
|
334
|
+
# reactor stops with open pools and async-pool force-cancels each
|
|
335
|
+
# gardener mid-wait, emitting a noisy (but harmless) ThreadError:
|
|
336
|
+
# "Attempt to unlock a mutex which is not locked".
|
|
337
|
+
begin
|
|
338
|
+
@http_client.close
|
|
339
|
+
rescue => e
|
|
340
|
+
@config.logger&.error("[PatientHttp] Error closing HTTP client: #{e.inspect}")
|
|
341
|
+
end
|
|
331
342
|
end
|
|
332
343
|
end
|
|
333
344
|
|
data/lib/patient_http.rb
CHANGED
|
@@ -307,8 +307,8 @@ module PatientHttp
|
|
|
307
307
|
if missing_keywords.any?
|
|
308
308
|
raise ArgumentError.new(
|
|
309
309
|
"Handler must accept keyword arguments: " \
|
|
310
|
-
"#{required_keywords.
|
|
311
|
-
"Missing: #{missing_keywords.
|
|
310
|
+
"#{required_keywords.join(", ")}. " \
|
|
311
|
+
"Missing: #{missing_keywords.join(", ")}"
|
|
312
312
|
)
|
|
313
313
|
end
|
|
314
314
|
|
|
@@ -321,7 +321,7 @@ module PatientHttp
|
|
|
321
321
|
|
|
322
322
|
raise ArgumentError.new(
|
|
323
323
|
"Handler must not have extra required keyword parameters. " \
|
|
324
|
-
"Found: #{extra_required_keywords.
|
|
324
|
+
"Found: #{extra_required_keywords.join(", ")}"
|
|
325
325
|
)
|
|
326
326
|
end
|
|
327
327
|
end
|