Small tweaks from reivew

This commit is contained in:
Georges-Antoine Assi
2023-08-03 12:57:16 -04:00
parent 36fb22dbe8
commit d2c1f6c41a
2 changed files with 4 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ engine = create_engine(ConfigLoader.get_db_engine(), pool_pre_ping=True)
session = sessionmaker(bind=engine, expire_on_commit=False)
@pytest.fixture(scope="session", autouse=True)
@pytest.fixture(scope="session")
def setup_database():
alembic.config.main(argv=["upgrade", "head"])

View File

@@ -40,6 +40,8 @@ def startup() -> None:
if __name__ == "__main__":
# Run migrations
alembic.config.main(argv=["upgrade", "head"])
# Run application
uvicorn.run("main:app", host=DEV_HOST, port=DEV_PORT, reload=True)
# uvicorn.run("main:app", host=DEV_HOST, port=DEV_PORT, reload=False, workers=2)