Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
wangpatrick57 committed Nov 13, 2024
1 parent d0e26f3 commit 8fdb303
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion env/pg_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def restart_with_changes(
dbdata_auto_conf_path = self.dbdata_dpath / "postgresql.auto.conf"
with open(dbdata_auto_conf_path, "w") as f:
f.write(
"\n".join([f"{knob} = {val}" for knob, val in conf_changes.items()]) + "\n"
"\n".join([f"{knob} = {val}" for knob, val in conf_changes.items()])
+ "\n"
)

assert (
Expand Down
2 changes: 1 addition & 1 deletion tune/demo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def main(self) -> None:
if knob != "" and val != "":
if "conf_changes" not in st.session_state:
st.session_state.conf_changes = dict()

# By using st.session_state, we persist changes across st.rerun() (though not across reloading the browser).
st.session_state.conf_changes[knob] = val
self.pg_conn.restart_with_changes(st.session_state.conf_changes)
Expand Down

0 comments on commit 8fdb303

Please sign in to comment.