@@ -68,9 +68,8 @@ def disable_connection_pooling(self):
6868 options = db_config .setdefault ("OPTIONS" , {})
6969 if "pool" in options :
7070 logger .info (
71- "PID %d disabling connection pooling for database '%s'" ,
72- os .getpid (),
73- alias ,
71+ "%(name)s disabling connection pooling for database '%(alias)s'" ,
72+ {"name" : self .name , "alias" : alias },
7473 )
7574 del options ["pool" ]
7675
@@ -82,14 +81,13 @@ def disable_connection_pooling(self):
8281 connection .pool .close ()
8382 connection .pool = None
8483 logger .debug (
85- "PID %d removed existing pool for '%s'" , os .getpid (), alias
84+ "%(name)s removed existing pool for '%(alias)s'" ,
85+ {"name" : self .name , "alias" : alias },
8686 )
8787 except Exception as e :
8888 logger .debug (
89- "PID %d failed to close existing pool for '%s': %s" ,
90- os .getpid (),
91- alias ,
92- e ,
89+ "%(name)s failed to close existing pool for '%(alias)s': %(e)s" ,
90+ {"name" : self .name , "alias" : alias , "e" : e },
9391 )
9492
9593 def reset_database_connections (self ):
@@ -99,8 +97,6 @@ def reset_database_connections(self):
9997 This disables connection pooling and resets connection state to prevent
10098 issues with shared connections between parent and child processes.
10199 """
102- # First disable connection pooling for steady_queue processes
103100 self .disable_connection_pooling ()
104101
105- # Close all existing connections
106102 connections .close_all ()
0 commit comments