Skip to content

Commit

Permalink
Migrate svc to use 8 instead of 7 for AP (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui authored Apr 21, 2024
1 parent 8209590 commit 3964aee
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/repositories/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
4: ("rx_stats", "std"),
5: ("rx_stats", "taiko"),
6: ("rx_stats", "ctb"),
7: ("ap_stats", "std"),
8: ("ap_stats", "std"),
}


Expand Down
2 changes: 1 addition & 1 deletion app/usecases/pp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
4: ("rx_stats", "std"),
5: ("rx_stats", "taiko"),
6: ("rx_stats", "ctb"),
7: ("ap_stats", "std"),
8: ("ap_stats", "std"),
}


Expand Down
2 changes: 1 addition & 1 deletion app/usecases/rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
4: ("relaxboard", "std"),
5: ("relaxboard", "taiko"),
6: ("relaxboard", "ctb"),
7: ("autoboard", "std"),
8: ("autoboard", "std"),
}


Expand Down
2 changes: 1 addition & 1 deletion app/usecases/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
4: ("rx_stats", "std"),
5: ("rx_stats", "taiko"),
6: ("rx_stats", "ctb"),
7: ("ap_stats", "std"),
8: ("ap_stats", "std"),
}


Expand Down
6 changes: 3 additions & 3 deletions app/workers/cronjobs/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
4: ("relaxboard", "std"),
5: ("relaxboard", "taiko"),
6: ("relaxboard", "ctb"),
7: ("autoboard", "std"),
8: ("autoboard", "std"),
}

db_map = {
Expand All @@ -33,7 +33,7 @@
4: ("rx_stats", "std"),
5: ("rx_stats", "taiko"),
6: ("rx_stats", "ctb"),
7: ("ap_stats", "std"),
8: ("ap_stats", "std"),
}


Expand Down Expand Up @@ -97,7 +97,7 @@ async def gather_profile_history(user: Mapping[str, Any]) -> None:

start_time = int(time.time())

for mode in range(8):
for mode in [0, 1, 2, 3, 4, 5, 6, 8]:
(db_table, mode_name) = db_map[mode]
latest_pp_awarded = await db.fetch_val(
f"SELECT latest_pp_awarded_{mode_name} FROM {db_table} WHERE id = :user_id",
Expand Down

0 comments on commit 3964aee

Please sign in to comment.