소스 검색

Try handling unclosed sql connections by calling dispose on the engine before it is put back into the pool.

ogert 5 년 전
부모
커밋
cf58907a9c
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      cdplib/db_handlers/SQLHandler.py

+ 3 - 3
cdplib/db_handlers/SQLHandler.py

@@ -502,13 +502,13 @@ class SQLHandler:
         :rtype: DataFrame
         '''
         try:
-            connection = self._engine.connect()
+            #connection = self._engine.connect()
 
             data = pd.read_sql(sql=query,
-                               con=connection,
+                               con=self._engines,
                                **read_sql_kwargs)
 
-            connection.close()
+            #connection.close()
            
             return data