refactor: changes entire project structure
This commit is contained in:
13
app/scoreboard/tasks.py
Normal file
13
app/scoreboard/tasks.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import schedule
|
||||
import time
|
||||
from app.scoreboard.update_nhl_standings_db import update_nhl_standings
|
||||
from app.scoreboard.get_data import store_scoreboard_data
|
||||
|
||||
def schedule_tasks():
|
||||
schedule.every(600).seconds.do(update_nhl_standings)
|
||||
schedule.every(10).seconds.do(store_scoreboard_data)
|
||||
while True:
|
||||
schedule.run_pending()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user