File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
crates/pg_workspace_new/src/workspace Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -55,23 +55,11 @@ impl DbConnection {
55
55
|| self . connection_string . as_ref ( ) . unwrap ( ) != connection_string
56
56
{
57
57
self . connection_string = Some ( connection_string. to_string ( ) ) ;
58
-
59
- if let Some ( pool) = self . pool . take ( ) {
60
- pool. close ( ) ;
61
- }
62
-
63
58
self . pool = Some ( PgPool :: connect_lazy ( connection_string) ?) ;
64
59
}
65
60
66
61
Ok ( ( ) )
67
62
}
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
- }
75
63
}
76
64
77
65
pub ( super ) struct WorkspaceServer {
@@ -129,12 +117,8 @@ impl WorkspaceServer {
129
117
}
130
118
131
119
fn refresh_db_connection ( & self ) -> Result < ( ) , WorkspaceError > {
132
- tracing:: info!( "Refreshing db connection4" ) ;
133
-
134
120
let s = self . settings ( ) ;
135
121
136
- tracing:: info!( "Acquiring connection lock" ) ;
137
-
138
122
let connection_string = s. as_ref ( ) . db . to_connection_string ( ) ;
139
123
self . connection
140
124
. write ( )
@@ -143,8 +127,6 @@ impl WorkspaceServer {
143
127
144
128
self . reload_schema_cache ( ) ?;
145
129
146
- tracing:: info!( "Db connection refreshed" ) ;
147
-
148
130
Ok ( ( ) )
149
131
}
150
132
You can’t perform that action at this time.
0 commit comments