Skip to content

Commit

Permalink
run init sql script after promoting server
Browse files Browse the repository at this point in the history
  • Loading branch information
var77 committed Jun 28, 2024
1 parent 37fafb7 commit bb40031
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prog/lantern/lantern_server_nexus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def destroy_domain
current_master.change_replication_mode("slave", update_env: false)
lantern_server.change_replication_mode("master")

hop_wait
hop_init_sql
end

label def wait_swap_ip
Expand Down
2 changes: 1 addition & 1 deletion spec/prog/lantern/lantern_server_nexus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@
expect(lantern_server).to receive(:run_query).with("SELECT pg_promote(true, 120);")
expect(current_master).to receive(:change_replication_mode).with("slave", update_env: false)
expect(lantern_server).to receive(:change_replication_mode).with("master")
expect { nx.promote_server }.to hop("wait")
expect { nx.promote_server }.to hop("init_sql")
end
end

Expand Down

0 comments on commit bb40031

Please sign in to comment.