Skip to content

Commit

Permalink
Rename graceful -> graceful_stop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Mar 26, 2024
1 parent cb54935 commit 72e89bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/async/container/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/async/container/.graceful.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ def setup(container)
end
end

controller = Graceful.new(graceful: 1)
controller = Graceful.new(graceful_stop: 1)

controller.run

0 comments on commit 72e89bd

Please sign in to comment.