Enabled pool_pre_ping to mitigate postgres drop
This commit is contained in:
@@ -35,6 +35,7 @@ class Database:
|
||||
self.engine = create_async_engine(
|
||||
self.connection_url,
|
||||
connect_args=connect_args,
|
||||
pool_pre_ping=True,
|
||||
)
|
||||
self.session_maker = async_sessionmaker(self.engine, autocommit=False, autoflush=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user