berryworld 1.0.0.197185__py3-none-any.whl → 1.0.0.197208__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1103,6 +1103,9 @@ class SQLPoolEngine:
1103
1103
 
1104
1104
  self.create_write_engine(commit_as_transaction=self.commit_as_transaction)
1105
1105
 
1106
+ # Dispose the engine after a certain timeout
1107
+ Thread(target=self.dispose_engine, args=(True, self.timeout)).start()
1108
+
1106
1109
  def credentials(self):
1107
1110
  """ Return the credentials used to connect to the SQL Server
1108
1111
  :return: Dictionary with the credentials used to connect to the SQL Server
@@ -1194,6 +1197,19 @@ class SQLPoolEngine:
1194
1197
  self.create_read_engine(commit_as_transaction=commit_as_transaction)
1195
1198
  self.con = self.engine_read.connect().connection
1196
1199
 
1200
+ def dispose_engine(self, timeout=0):
1201
+ """ Dispose any opened engines with the Server
1202
+ :return: None
1203
+ """
1204
+ if timeout > 0:
1205
+ time.sleep(timeout)
1206
+
1207
+ if self.engine_read:
1208
+ self.engine_read.dispose()
1209
+
1210
+ if self.engine_write:
1211
+ self.engine_write.dispose()
1212
+
1197
1213
  def query(self, sql_query, coerce_float=False):
1198
1214
  """ Read data from SQL according to the sql_query
1199
1215
  -----------------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: berryworld
3
- Version: 1.0.0.197185
3
+ Version: 1.0.0.197208
4
4
  Summary: Handy classes to improve ETL processes
5
5
  Home-page: https://www.berryworld.com
6
6
  Author: BerryWorld ltd
@@ -19,19 +19,19 @@ berryworld/power_automate.py,sha256=V86QEGG9H36DrDvod9Q6yp8OUu307hfYcXJhw06pYrA,
19
19
  berryworld/sharepoint_con.py,sha256=nmyZJIcaAKJ6Y-ti4gQbvzA_rRbrMGIxTDXe4eP-tiI,44950
20
20
  berryworld/snowflake_conn.py,sha256=L0ePgTKa3tvaxj88BZmsjS6cFp3ZU3rytw7S2jkuA-U,3161
21
21
  berryworld/sql_conn.py,sha256=6kUR3oLXweakz2IBc4zI1ZMqRoN8K6nbQneHhenM-7I,47668
22
- berryworld/sql_connenction.py,sha256=L44yai-6rfZOvUdAlbYfm8TQNPO9VGRG6jf3thAErGE,104599
22
+ berryworld/sql_connenction.py,sha256=7-7TCbWh-2Ij-wawhKXUUAKfG-3UlAcwElPCF0XHdlg,105058
23
23
  berryworld/teams_logging.py,sha256=8NwXyWr4fLj7W6GzAm2nRQCGFDxibQpAHDHHD24FrP8,6997
24
24
  berryworld/transportation_solver.py,sha256=tNc1JJk71azIBccdWVHbqcvXWhalOdKffv6HmBD6tG0,5014
25
25
  berryworld/verify_keys.py,sha256=X7VUHqYDklWPDO0bGVHIOXeLq5Qi4fZRZbHYw5x7UnA,4356
26
26
  berryworld/vivantio.py,sha256=QfZo0UKqkzVRg_LyiwivNd3aEup4TH57x4KxLZkCJwc,10627
27
27
  berryworld/vivantio_logging.py,sha256=ciy7gA4u3FrgUIpEBnMgocbNPp6jcu9TPoy-kLcrTZU,5736
28
28
  berryworld/xml_parser.py,sha256=HWD71NaTN3DaIOGT6Wzxs4CEsroFhGQwe9iPLIL80Co,957
29
- berryworld-1.0.0.197185.dist-info/licenses/LICENSE,sha256=vtkVCJM6E2af2gnsi2XxKPr4WY-uIbvzVLXieFND0UU,1074
29
+ berryworld-1.0.0.197208.dist-info/licenses/LICENSE,sha256=vtkVCJM6E2af2gnsi2XxKPr4WY-uIbvzVLXieFND0UU,1074
30
30
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  tests/test_allocation_config.py,sha256=e12l6fE9U57eSPS35g6ekJ_hol7-RHg89JV60_m1BlE,4633
32
32
  tests/test_handy_mix_config.py,sha256=Un56mz9KJmdn4K4OwzHAHLSRzDU1Xv2nFrONNuzOG04,2594
33
33
  tests/test_xml_parser.py,sha256=3QTlhFEd6KbK6nRFKZnc35tad6wqukTbe4QrFi8mr_8,859
34
- berryworld-1.0.0.197185.dist-info/METADATA,sha256=5VikXi4UH2LxlvufPbOQg8FK6IeIL5IXELqYtQgMc80,1445
35
- berryworld-1.0.0.197185.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
- berryworld-1.0.0.197185.dist-info/top_level.txt,sha256=GIZ5qy-P5oxfEH755vA1IMFeTVdX3-40JxMe6nOe5I8,17
37
- berryworld-1.0.0.197185.dist-info/RECORD,,
34
+ berryworld-1.0.0.197208.dist-info/METADATA,sha256=LOqs33nVopD09wuMZvWqULc3ozw_MEQucEGm_lDA9F8,1445
35
+ berryworld-1.0.0.197208.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
+ berryworld-1.0.0.197208.dist-info/top_level.txt,sha256=GIZ5qy-P5oxfEH755vA1IMFeTVdX3-40JxMe6nOe5I8,17
37
+ berryworld-1.0.0.197208.dist-info/RECORD,,