瀏覽代碼

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

ogert 4 年之前
父節點
當前提交
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