diff --git a/lib/async/container/controller.rb b/lib/async/container/controller.rb index 1bdc115..05a3f01 100644 --- a/lib/async/container/controller.rb +++ b/lib/async/container/controller.rb @@ -22,7 +22,7 @@ class Controller # Initialize the controller. # @parameter notify [Notify::Client] A client used for process readiness notifications. - def initialize(notify: Notify.open!, container_class: Container, graceful: true) + def initialize(notify: Notify.open!, container_class: Container, graceful_stop: true) @container = nil @container_class = container_class @@ -36,7 +36,7 @@ def initialize(notify: Notify.open!, container_class: Container, graceful: true) self.restart end - @graceful = graceful + @graceful_stop = graceful_stop end # The state of the controller. @@ -98,7 +98,7 @@ def start # Stop the container if it's running. # @parameter graceful [Boolean] Whether to give the children instances time to shut down or to kill them immediately. - def stop(graceful = @graceful) + def stop(graceful = @graceful_stop) @container&.stop(graceful) @container = nil end @@ -144,7 +144,7 @@ def restart if old_container Console.logger.debug(self, "Stopping old container...") - old_container&.stop(@graceful) + old_container&.stop(@graceful_stop) end @notify&.ready! diff --git a/test/async/container/.graceful.rb b/test/async/container/.graceful.rb index 49b7092..d1b56ac 100755 --- a/test/async/container/.graceful.rb +++ b/test/async/container/.graceful.rb @@ -30,6 +30,6 @@ def setup(container) end end -controller = Graceful.new(graceful: 1) +controller = Graceful.new(graceful_stop: 1) controller.run