File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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.
You can’t perform that action at this time.
0 commit comments