Skip to content

Commit

Permalink
fix: don't start startup jobs twice
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen authored Apr 19, 2024
1 parent 55ec33d commit fbc8dcf
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions api/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ async def update_smoelen():
handle_unprocessed(db)


@asynccontextmanager
async def startup(_app: FastAPI) -> None:
"""Startup context manager"""
await update_smoelen()
yield


models.Base.metadata.create_all(bind=engine)
app = FastAPI(lifespan=startup)

Expand Down

0 comments on commit fbc8dcf

Please sign in to comment.