File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1010
1111module Async
1212 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+
1319 # Manages a group of running processes.
1420 class Group
1521 # Initialize an empty group.
@@ -153,7 +159,7 @@ def kill
153159 # @parameter graceful [Boolean] Whether to send SIGINT first or skip directly to SIGTERM.
154160 # @parameter interrupt_timeout [Numeric | Nil] Time to wait after SIGINT before escalating to SIGTERM.
155161 # @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 )
157163 case graceful
158164 when true
159165 # Use defaults.
Original file line number Diff line number Diff line change 11# Releases
22
3+ ## Unreleased
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+
38## v0.26.0
49
510### Production Reliability Improvements
You can’t perform that action at this time.
0 commit comments