patient_http-solid_queue 1.2.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5b556f667fd07c4e9dc41089d036b95fbe0c6ef9e820d5dfde5aea7f74fd76e
4
- data.tar.gz: eb4583469ba5e2db21d19af63e5f6b601c2bff969e9c116e44087a1cea2717cb
3
+ metadata.gz: 93637c08faca559001df1b35d597ce4dafa12bc707a333b96f1ba628c6c8255d
4
+ data.tar.gz: f3a9bda7c95644bcd77ab5504e0e2d00c52ad7e5a9eb2d64a04c840033c4d303
5
5
  SHA512:
6
- metadata.gz: a92d7a43aed5ed18160344e165c620dad2c2aae02184a1c4b3be41c59b3a41a5cc16c8628ff44e55c38e9fe0e4b5a24b8cde5aeb572db4792eca34de0c736eea
7
- data.tar.gz: 77874d19a4dcbfbe0f6657b780d30a33a321eec9f6fad9cc5689a746bdfe1287bfdc28e33a64e4ca10610b19bdbcd0665dd515f8c264be440da21f51790f4d62
6
+ metadata.gz: 2f5150d168f6e14bc266fadc8e9553cb393aa6eb0375205468e7404dbc79e41e7bdfb717d47925d6cddd9b5d482b8c697af3a229fb1a652ad08a3393ba55ba07
7
+ data.tar.gz: a450a384dcfec5176813310d6bcbff694f1df639bd1cec11dc4affbd91c5b4518377c86e41af78b1773523bd7edf52d1f7694e0249a0ef5552d87ce37a58dabe
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.2.1
8
+
9
+ ### Fixed
10
+
11
+ - The request handler is no longer unregistered when the processors stop. SolidQueue runs its worker stop hooks before the execution pool is drained, so a job that submitted a request during the shutdown window raised `No request handler registered` and the request was lost. The handler now stays registered for the life of the process, and a request submitted after the processors have stopped is enqueued as a job and executed by the next process.
12
+
7
13
  ## 1.2.0
8
14
 
9
15
  ### Added
data/README.md CHANGED
@@ -296,7 +296,7 @@ end
296
296
 
297
297
  For classes that make many async HTTP requests, you can include `PatientHttp::RequestHelper` to get convenient instance methods like `async_get`, `async_post`, `async_put`, `async_patch`, and `async_delete`. You can also define a request template at the class level using the `request_template` class method to set shared options like `base_url`, `headers`, and `timeout`.
298
298
 
299
- When using this gem, the request handler is automatically registered when the processor starts and unregistered when it stops — no manual setup is required.
299
+ When using this gem, the request handler is automatically registered when you call `PatientHttp::SolidQueue.configure` or when the processor starts — no manual setup is required. The handler stays registered when the processor stops, so a request submitted while the worker is shutting down is enqueued as a job and executed by the next process instead of being lost.
300
300
 
301
301
  ```ruby
302
302
  class NotificationService
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -239,13 +239,14 @@ module PatientHttp
239
239
 
240
240
  # Stop all processors gracefully.
241
241
  #
242
+ # The request handler stays registered. SolidQueue runs its worker stop hooks
243
+ # before the execution pool is drained, and a job that submits a request after
244
+ # the processors have stopped must have it enqueued as a job for the next
245
+ # process rather than raise. Only {.reset!} removes the handler.
246
+ #
242
247
  # @param timeout [Float, nil] maximum time to wait for in-flight requests to complete
243
248
  # @return [void]
244
249
  def stop(timeout: nil)
245
- if @request_handler
246
- PatientHttp.unregister_handler(@request_handler)
247
- end
248
-
249
250
  @lifecycle_mutex.synchronize do
250
251
  return if @processors.empty?
251
252
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patient_http-solid_queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Durand
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  requirements: []
92
- rubygems_version: 4.0.3
92
+ rubygems_version: 3.6.9
93
93
  specification_version: 4
94
94
  summary: Offload async HTTP requests from Solid Queue workers to a dedicated async
95
95
  I/O processor