Skip to content

Commit 565c97f

Browse files
committed
cleanup
1 parent 93afa4b commit 565c97f

File tree

1 file changed

+0
-18
lines changed
  • crates/pg_workspace_new/src/workspace

1 file changed

+0
-18
lines changed

crates/pg_workspace_new/src/workspace/server.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,11 @@ impl DbConnection {
5555
|| self.connection_string.as_ref().unwrap() != connection_string
5656
{
5757
self.connection_string = Some(connection_string.to_string());
58-
59-
if let Some(pool) = self.pool.take() {
60-
pool.close();
61-
}
62-
6358
self.pool = Some(PgPool::connect_lazy(connection_string)?);
6459
}
6560

6661
Ok(())
6762
}
68-
69-
pub(crate) fn close(&mut self) {
70-
if let Some(pool) = self.pool.take() {
71-
pool.close();
72-
}
73-
self.connection_string = None;
74-
}
7563
}
7664

7765
pub(super) struct WorkspaceServer {
@@ -129,12 +117,8 @@ impl WorkspaceServer {
129117
}
130118

131119
fn refresh_db_connection(&self) -> Result<(), WorkspaceError> {
132-
tracing::info!("Refreshing db connection4");
133-
134120
let s = self.settings();
135121

136-
tracing::info!("Acquiring connection lock");
137-
138122
let connection_string = s.as_ref().db.to_connection_string();
139123
self.connection
140124
.write()
@@ -143,8 +127,6 @@ impl WorkspaceServer {
143127

144128
self.reload_schema_cache()?;
145129

146-
tracing::info!("Db connection refreshed");
147-
148130
Ok(())
149131
}
150132

0 commit comments

Comments
 (0)