Skip to content

Commit

Permalink
repeated job doesnt take background task
Browse files Browse the repository at this point in the history
  • Loading branch information
vladsavelyev committed Mar 27, 2024
1 parent 55ff7ec commit a04c420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@ def _update_download_stats():
wait_first=True,
logger=logger,
)
async def update_downloads(background_tasks: BackgroundTasks):
async def update_downloads():
"""
Repeated task to update the daily download statistics.
"""
background_tasks.add_task(_update_download_stats)
_update_download_stats()


@app.post("/persist_visits")
Expand Down

0 comments on commit a04c420

Please sign in to comment.