Skip to content

Commit

Permalink
changed to pessemistic pool_pre_ping to deal with "the server has gon…
Browse files Browse the repository at this point in the history
…e away" error
  • Loading branch information
niquerio committed Dec 9, 2024
1 parent ce86f56 commit 0b9e52c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aim/digifeeds/database/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
if S.ci_on: # pragma: no cover
engine = create_engine(S.test_database)
else: # pragma: no cover
engine = create_engine(S.mysql_database, pool_recycle=1800)
engine = create_engine(S.mysql_database, pool_pre_ping=True)

SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)

Expand Down

0 comments on commit 0b9e52c

Please sign in to comment.