Skip to content

Commit 65d349f

Browse files
committed
Fix hybrid container health-check handling.
1 parent 1ca1dcc commit 65d349f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/async/container/hybrid.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ class Hybrid < Forked
1515
# @parameter count [Integer] The number of instances to start.
1616
# @parameter forks [Integer] The number of processes to fork.
1717
# @parameter threads [Integer] the number of threads to start.
18-
def run(count: nil, forks: nil, threads: nil, **options, &block)
18+
# @parameter health_check_timeout [Numeric] The timeout for health checks, in seconds. Passed into the child {Threaded} containers.
19+
def run(count: nil, forks: nil, threads: nil, health_check_timeout: nil, **options, &block)
1920
processor_count = Container.processor_count
2021
count ||= processor_count ** 2
2122
forks ||= [processor_count, count].min
@@ -25,7 +26,7 @@ def run(count: nil, forks: nil, threads: nil, **options, &block)
2526
self.spawn(**options) do |instance|
2627
container = Threaded.new
2728

28-
container.run(count: threads, **options, &block)
29+
container.run(count: threads, health_check_timeout: health_check_timeout, **options, &block)
2930

3031
container.wait_until_ready
3132
instance.ready!

0 commit comments

Comments
 (0)