feat(score): support recalculate statistics
This commit is contained in:
6
main.py
6
main.py
@@ -25,7 +25,7 @@ from app.service.calculate_all_user_rank import calculate_user_rank
|
||||
from app.service.create_banchobot import create_banchobot
|
||||
from app.service.daily_challenge import daily_challenge_job
|
||||
from app.service.osu_rx_statistics import create_rx_statistics
|
||||
from app.service.pp_recalculate import recalculate_all_players_pp
|
||||
from app.service.recalculate import recalculate
|
||||
|
||||
from fastapi import FastAPI, HTTPException, Request
|
||||
from fastapi.exceptions import RequestValidationError
|
||||
@@ -38,8 +38,8 @@ import sentry_sdk
|
||||
async def lifespan(app: FastAPI):
|
||||
# on startup
|
||||
await get_fetcher() # 初始化 fetcher
|
||||
if os.environ.get("RECALCULATE_PP", "false").lower() == "true":
|
||||
await recalculate_all_players_pp()
|
||||
if os.environ.get("RECALCULATE", "false").lower() == "true":
|
||||
await recalculate()
|
||||
await create_rx_statistics()
|
||||
await calculate_user_rank(True)
|
||||
init_scheduler()
|
||||
|
||||
Reference in New Issue
Block a user