mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: connect pool pre ping
This commit is contained in:
@@ -147,7 +147,8 @@ def get_engine(ds: CoreDatasource, timeout: int = 0, use_pool: bool = False) ->
|
||||
db_config = {
|
||||
'pool_size': conf.poolSize if conf.poolSize else 5,
|
||||
'max_overflow': 20,
|
||||
'pool_recycle': 3600
|
||||
'pool_recycle': 3600,
|
||||
'pool_pre_ping': True
|
||||
} if use_pool else {
|
||||
'poolclass': NullPool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user