forked from spacebar/SplatNet-Backend
Attempt to mitigate errors w/ HTTPS
This commit is contained in:
parent
8f7e705092
commit
f5249ae489
4 changed files with 15 additions and 20 deletions
|
|
@ -23,6 +23,7 @@ class Session(Base):
|
|||
engine = create_engine(settings.db_url, pool_pre_ping=True)
|
||||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
|
||||
# TODO: look into why this is being called twice on startup
|
||||
def init_db():
|
||||
try:
|
||||
Base.metadata.create_all(bind=engine)
|
||||
|
|
@ -34,4 +35,4 @@ def init_db():
|
|||
print(f"database setup error: {str(e)}")
|
||||
raise
|
||||
|
||||
init_db()
|
||||
init_db()
|
||||
Loading…
Reference in a new issue