Merge branch 'master' of git.kaiyuancloud.cn:yumoqing/sqlor

This commit is contained in:
yumoqing 2024-11-08 20:20:27 +08:00
commit 5eec6cd922
2 changed files with 4 additions and 4 deletions

View File

@ -12,6 +12,7 @@ from appPublic.Singleton import SingletonDecorator
from appPublic.myjson import loadf
from appPublic.jsonConfig import getConfig
from appPublic.rc4 import unpassword
from appPublic.log import exception
import threading
from .sor import SQLor
@ -208,8 +209,7 @@ class DBPools:
try:
yield sqlor
except Exception as e:
print_exc()
print('Exeception=',e)
exception(f'sqlorContext():EXCEPTION{e}')
if sqlor and sqlor.dataChanged:
await sqlor.rollback()
finally:

View File

@ -12,6 +12,7 @@ from appPublic.Singleton import SingletonDecorator
from appPublic.myjson import loadf
from appPublic.jsonConfig import getConfig
from appPublic.rc4 import unpassword
from appPublic.log import exception
import threading
from .sor import SQLor
@ -208,8 +209,7 @@ class DBPools:
try:
yield sqlor
except Exception as e:
print_exc()
print('Exeception=',e)
exception(f'sqlorContext():EXCEPTION{e}')
if sqlor and sqlor.dataChanged:
await sqlor.rollback()
finally: