sycommon-python-lib 0.2.4a4__py3-none-any.whl → 0.2.4a6__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.
- sycommon/database/async_database_service.py +15 -0
- {sycommon_python_lib-0.2.4a4.dist-info → sycommon_python_lib-0.2.4a6.dist-info}/METADATA +1 -1
- {sycommon_python_lib-0.2.4a4.dist-info → sycommon_python_lib-0.2.4a6.dist-info}/RECORD +6 -6
- {sycommon_python_lib-0.2.4a4.dist-info → sycommon_python_lib-0.2.4a6.dist-info}/WHEEL +0 -0
- {sycommon_python_lib-0.2.4a4.dist-info → sycommon_python_lib-0.2.4a6.dist-info}/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.4a4.dist-info → sycommon_python_lib-0.2.4a6.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
|
|
2
2
|
from sqlalchemy import text
|
|
3
3
|
|
|
4
|
+
# Fix: aiomysql's AsyncAdapt ping() requires 'reconnect' positional arg,
|
|
5
|
+
# but SQLAlchemy's pymysql dialect calls ping() without it.
|
|
6
|
+
# aiomysql asserts reconnect must be False (async reconnection is handled by pool).
|
|
7
|
+
from sqlalchemy.dialects.mysql.pymysql import MySQLDialect_pymysql
|
|
8
|
+
|
|
9
|
+
_original_do_ping = MySQLDialect_pymysql.do_ping
|
|
10
|
+
|
|
11
|
+
def _patched_do_ping(self, dbapi_connection):
|
|
12
|
+
try:
|
|
13
|
+
return _original_do_ping(self, dbapi_connection)
|
|
14
|
+
except TypeError:
|
|
15
|
+
dbapi_connection.ping(reconnect=False)
|
|
16
|
+
|
|
17
|
+
MySQLDialect_pymysql.do_ping = _patched_do_ping
|
|
18
|
+
|
|
4
19
|
from sycommon.config.Config import SingletonMeta
|
|
5
20
|
from sycommon.config.DatabaseConfig import DatabaseConfig, convert_dict_keys
|
|
6
21
|
from sycommon.logging.kafka_log import SYLogger
|
|
@@ -159,7 +159,7 @@ sycommon/config/SentryConfig.py,sha256=OsLb3G9lTsCSZ7tWkcXWJHmvfILQopBxje5pjnkFJ
|
|
|
159
159
|
sycommon/config/XxlJobConfig.py,sha256=VSG6dn9ysfUVunOs7PqugyZUGJWmX_cEePz2ZCfqHtU,392
|
|
160
160
|
sycommon/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
161
161
|
sycommon/database/async_base_db_service.py,sha256=w6ONUiTtF4-bXRnkBt9QpL9BAy0XUDbQG7F9Hf2rfjw,1337
|
|
162
|
-
sycommon/database/async_database_service.py,sha256=
|
|
162
|
+
sycommon/database/async_database_service.py,sha256=Cf3RaO3skP6IAJrkta-CRE-Q1NtjWLPLUe9hazB8LRM,4873
|
|
163
163
|
sycommon/database/base_db_service.py,sha256=J5ELHMNeGfzA6zVcASPSPZ0XNKrRY3_gdGmVkZw3Mto,946
|
|
164
164
|
sycommon/database/database_service.py,sha256=IMoJ9554dYkr6QfRofvNa0VR24U1WQDz_ATrg0-6EQ0,3857
|
|
165
165
|
sycommon/database/elasticsearch_service.py,sha256=qm490GRlxZlYsQgyfyclSbARRP1-Tc4Lwav3lbPINvQ,3092
|
|
@@ -265,8 +265,8 @@ sycommon/tools/syemail.py,sha256=BDFhgf7WDOQeTcjxJEQdu0dQhnHFPO_p3eI0-Ni3LhQ,561
|
|
|
265
265
|
sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
|
|
266
266
|
sycommon/xxljob/__init__.py,sha256=7eoBlQxv-B39IfRSCY2bkqdGYs1QRe1umAWd88VMEEM,86
|
|
267
267
|
sycommon/xxljob/xxljob_service.py,sha256=JIEJaGXhqrTLcyxlyynSrsHg9bBnDNzX-D4qIWLRPUE,6815
|
|
268
|
-
sycommon_python_lib-0.2.
|
|
269
|
-
sycommon_python_lib-0.2.
|
|
270
|
-
sycommon_python_lib-0.2.
|
|
271
|
-
sycommon_python_lib-0.2.
|
|
272
|
-
sycommon_python_lib-0.2.
|
|
268
|
+
sycommon_python_lib-0.2.4a6.dist-info/METADATA,sha256=zEXUYpdlTosCIr50Ie2AN9v8GTI7AX_amje0Ag07KBI,7879
|
|
269
|
+
sycommon_python_lib-0.2.4a6.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
270
|
+
sycommon_python_lib-0.2.4a6.dist-info/entry_points.txt,sha256=gsR4SssKxDWjRU8ggidzNcdMXDPRSKRS7UaGyNP84Qg,92
|
|
271
|
+
sycommon_python_lib-0.2.4a6.dist-info/top_level.txt,sha256=RgphKrg7nJyZ7irJqbxFr-5H2LUYTvI7ivoWZH2hcD0,29
|
|
272
|
+
sycommon_python_lib-0.2.4a6.dist-info/RECORD,,
|
|
File without changes
|
{sycommon_python_lib-0.2.4a4.dist-info → sycommon_python_lib-0.2.4a6.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{sycommon_python_lib-0.2.4a4.dist-info → sycommon_python_lib-0.2.4a6.dist-info}/top_level.txt
RENAMED
|
File without changes
|