Skip to content

Commit db74350

Browse files
Use controller events for restart waits.
Assisted-By: devx/3236e566-7538-432e-a30a-2bdf37265ed4
1 parent 9e75077 commit db74350

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/async/container/controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def start
143143
unless @container
144144
Console.info(self, "Controller starting...")
145145

146-
if self.restart(@events) == :event
146+
if self.restart == :event
147147
return
148148
end
149149
end
@@ -162,7 +162,7 @@ def stop(graceful = @graceful_stop)
162162

163163
# Restart the container. A new container is created, and if successful, any old container is terminated gracefully.
164164
# This is equivalent to a blue-green deployment.
165-
def restart(events = nil)
165+
def restart
166166
if @container
167167
@notify&.restarting!
168168

@@ -184,7 +184,7 @@ def restart(events = nil)
184184
# Wait for all child processes to enter the ready state.
185185
Console.info(self, "Waiting for startup...")
186186

187-
if container.wait_until_ready(events) == :event
187+
if container.wait_until_ready(@events) == :event
188188
return :event
189189
end
190190

0 commit comments

Comments
 (0)