async-service 0.20.0 → 0.20.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: dbf0b6499a4433f09585491d1097e280a739775f24557f57ea89a5f7e1c345f1
4
- data.tar.gz: 7ffe1c3251852c4a57b6ad70f0e9d89f461bb272eef48cb9556f17e21369c6a6
3
+ metadata.gz: 2d1b7a93421f685e9a7b545f73facbe3182d2e8da3458f7c70f43902dae2ce5a
4
+ data.tar.gz: a251e23004b48a5993665692e54037e2079f1e9176ba283fc1eb2f34b6388995
5
5
  SHA512:
6
- metadata.gz: 477ed5f425e11f46b91da568ab84af8c32b74b873ed0909579cbad67b787a2c9230ae9aea871ae42fcb413437b5879b2ae36673c7c1a8a1117f27f759c2494cb
7
- data.tar.gz: 83ec254a0835ea322ffdad5f41cfbf76ab322f739db150ab97ddecf8503b2f08408025e06613e552270f18dc9b9e3d5c934f62e7a0020e121fc55e0c13a45fef
6
+ metadata.gz: bffe72b2c92b84fe2ecda60023ab1efc9c46f996e62e0ccda98a230d716ead4893879c78000eb2980c50a7dd0b9391b3158561f820e2dc3d5d6af2d17dec85c8
7
+ data.tar.gz: 8644d5b85ce7d4e40c04002c61432eb956ff75fd227435f45fe32b13c3e50973282b6c72b92e8b8eb3da99fe8ef876845c14a4830d09cd828cac921a43e7a308
checksums.yaml.gz.sig CHANGED
Binary file
@@ -51,8 +51,8 @@ module Async
51
51
  rate = container.statistics.failure_rate.per_second
52
52
 
53
53
  if rate > @failure_rate_threshold
54
- # Only stop if container is still running (avoid redundant stop calls during shutdown)
55
- if container.running?
54
+ # Only stop if container is not already stopping
55
+ unless container.stopping?
56
56
  Console.error(self, "Failure rate exceeded threshold, stopping container!",
57
57
  rate: rate,
58
58
  threshold: @failure_rate_threshold
@@ -7,6 +7,6 @@
7
7
  module Async
8
8
  # @namespace
9
9
  module Service
10
- VERSION = "0.20.0"
10
+ VERSION = "0.20.1"
11
11
  end
12
12
  end
data/readme.md CHANGED
@@ -31,6 +31,10 @@ Please see the [project documentation](https://socketry.github.io/async-service/
31
31
 
32
32
  Please see the [project releases](https://socketry.github.io/async-service/releases/index) for all releases.
33
33
 
34
+ ### v0.20.1
35
+
36
+ - Use `container.stopping?` in policy to prevent redundant stop calls during graceful shutdown.
37
+
34
38
  ### v0.20.0
35
39
 
36
40
  - Introduce `Async::Service::Policy` for monitoring service health and implementing failure handling strategies. Default threshold: 6 failures in 60 seconds (0.1 failures/second).
@@ -79,10 +83,6 @@ Please see the [project releases](https://socketry.github.io/async-service/relea
79
83
 
80
84
  - Use `String::Format` gem for formatting.
81
85
 
82
- ### v0.14.0
83
-
84
- - Introduce `ContainerEnvironment` and `ContainerService` for implementing best-practice services.
85
-
86
86
  ## Contributing
87
87
 
88
88
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.20.1
4
+
5
+ - Use `container.stopping?` in policy to prevent redundant stop calls during graceful shutdown.
6
+
3
7
  ## v0.20.0
4
8
 
5
9
  - Introduce `Async::Service::Policy` for monitoring service health and implementing failure handling strategies. Default threshold: 6 failures in 60 seconds (0.1 failures/second).
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.33'
61
+ version: '0.34'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.33'
68
+ version: '0.34'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: string-format
71
71
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file