Skip to content

Commit

Permalink
🗃️ Fix SQLAlchemy operation error after database restarts (fastapi#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebreton authored and tiangolo committed May 22, 2019
1 parent 8558ee6 commit 8518911
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from app.core import config

engine = create_engine(config.SQLALCHEMY_DATABASE_URI)
engine = create_engine(config.SQLALCHEMY_DATABASE_URI, pool_pre_ping=True)
db_session = scoped_session(
sessionmaker(autocommit=False, autoflush=False, bind=engine)
)
Expand Down

0 comments on commit 8518911

Please sign in to comment.