Skip to content

Commit

Permalink
Fix comment and remove unneeded else block
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloneppel committed Aug 24, 2022
1 parent 4b7a534 commit c92fdbc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ def _on_peer_relation_changed(self, event: RelationChangedEvent) -> None:
# one at a time.
if self.unit.is_leader():
self._add_members(event)
else:
# Update the Patroni configuration in this unit to use new passwords when they change.
# The config is reloaded later in `update_cluster_members` if the member has already
# started, or it is loaded the first time Patroni starts.
self._patroni.render_patroni_yml_file()

# Don't update this member before it's part of the members list.
if self._endpoint not in self._endpoints:
Expand Down Expand Up @@ -506,7 +501,7 @@ def _on_set_password(self, event: ActionEvent) -> None:
self._set_secret("app", f"{username}-password", password)

# Update and reload Patroni configuration in this unit to use the new password.
# Other units Patroni configuration will be
# Other units Patroni configuration will be reloaded in the peer relation changed event.
self._patroni.render_patroni_yml_file()
self._patroni.reload_patroni_configuration()

Expand Down
Empty file.

0 comments on commit c92fdbc

Please sign in to comment.