Skip to content

Commit

Permalink
reduce wait time when stopping container on switchover
Browse files Browse the repository at this point in the history
  • Loading branch information
var77 committed Nov 8, 2024
1 parent 94281d6 commit fc6a25b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions model/lantern/lantern_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ def is_dns_correct?
domain && Resolv.getaddress(domain) == vm.sshable.host
end

def stop_container
vm.sshable.cmd("sudo docker compose -f #{Config.compose_file} down -t 60 || true")
def stop_container(timeout=60)
vm.sshable.cmd("sudo docker compose -f #{Config.compose_file} down -t #{timeout} || true")
end

def start_container
Expand Down
2 changes: 1 addition & 1 deletion prog/lantern/lantern_resource_nexus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def before_run
end

label def switch_dns_with_parent
lantern_resource.parent.representative_server.stop_container
lantern_resource.parent.representative_server.stop_container(1)
lantern_resource.update(logical_replication: false)

if lantern_resource.parent.representative_server.domain.nil?
Expand Down

0 comments on commit fc6a25b

Please sign in to comment.