async-container 0.26.0 → 0.27.0

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: 3b5ef8adc5ee828c6c044454180bf3a0de60eca666c4fa00a9c3f6b65c3ddff6
4
- data.tar.gz: 778afef1c04f76a74dd03feecc0af119890875bb3dcfcfb4526556615ee789aa
3
+ metadata.gz: 7beb84adfd9648242dc7850eab94f4d080fea57d2ff218a02950c18008b0d2c5
4
+ data.tar.gz: c558b447f4f4273350e5be255a6916020592a747243a6f5a3a937bea114b905c
5
5
  SHA512:
6
- metadata.gz: 0736e1e1e2cdbed60648aac53ecf2ab258436f08f44427cc1cbc516a24a584cc9cd82449129faaf6d71a1486a3a781240de2725f6fe57a0d369ec4b6e46df4c3
7
- data.tar.gz: 330e8827656fdae8a1943768519a9642f8dccd598e7c036b7b22ecf0043757ddccbb2b5fd1592c26b6112ce43e4aa29541876fe494beca186cadde096e071381
6
+ metadata.gz: 8b6bdc0e7268ef3c39f0591c9d3d4d5609b6a0e0cec112a69d6d0563e891af0caee0af78f98afa5dcf74f4cb0b8167e69f6afeb4c7ef7437a0f8717c0d1423d3
7
+ data.tar.gz: df8b60f1e3d9b4efb9b677605cc1dad130f8be806b282c4ef6522e809d62edc985432b49d1d2458e47d142e0a489a4c4d6db00cd0194cca5af386a2addcbd5c5
checksums.yaml.gz.sig CHANGED
Binary file
@@ -10,6 +10,12 @@ require_relative "error"
10
10
 
11
11
  module Async
12
12
  module Container
13
+ # The default timeout for interrupting processes, before escalating to terminating.
14
+ INTERRUPT_TIMEOUT = ENV.fetch("ASYNC_CONTAINER_INTERRUPT_TIMEOUT", 10).to_f
15
+
16
+ # The default timeout for terminating processes, before escalating to killing.
17
+ TERMINATE_TIMEOUT = ENV.fetch("ASYNC_CONTAINER_TERMINATE_TIMEOUT", 10).to_f
18
+
13
19
  # Manages a group of running processes.
14
20
  class Group
15
21
  # Initialize an empty group.
@@ -153,7 +159,7 @@ module Async
153
159
  # @parameter graceful [Boolean] Whether to send SIGINT first or skip directly to SIGTERM.
154
160
  # @parameter interrupt_timeout [Numeric | Nil] Time to wait after SIGINT before escalating to SIGTERM.
155
161
  # @parameter terminate_timeout [Numeric | Nil] Time to wait after SIGTERM before escalating to SIGKILL.
156
- def stop(graceful = true, interrupt_timeout: 1, terminate_timeout: 1)
162
+ def stop(graceful = true, interrupt_timeout: INTERRUPT_TIMEOUT, terminate_timeout: TERMINATE_TIMEOUT)
157
163
  case graceful
158
164
  when true
159
165
  # Use defaults.
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Container
8
- VERSION = "0.26.0"
8
+ VERSION = "0.27.0"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -26,6 +26,11 @@ Please see the [project documentation](https://socketry.github.io/async-containe
26
26
 
27
27
  Please see the [project releases](https://socketry.github.io/async-container/releases/index) for all releases.
28
28
 
29
+ ### v0.27.0
30
+
31
+ - Increased default interrupt timeout and terminate timeout to 10 seconds each.
32
+ - Expose `ASYNC_CONTAINER_INTERRUPT_TIMEOUT` and `ASYNC_CONTAINER_TERMINATE_TIMEOUT` environment variables for configuring default timeouts.
33
+
29
34
  ### v0.26.0
30
35
 
31
36
  - [Production Reliability Improvements](https://socketry.github.io/async-container/releases/index#production-reliability-improvements)
data/releases.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Releases
2
2
 
3
+ ## v0.27.0
4
+
5
+ - Increased default interrupt timeout and terminate timeout to 10 seconds each.
6
+ - Expose `ASYNC_CONTAINER_INTERRUPT_TIMEOUT` and `ASYNC_CONTAINER_TERMINATE_TIMEOUT` environment variables for configuring default timeouts.
7
+
3
8
  ## v0.26.0
4
9
 
5
10
  ### Production Reliability Improvements
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file