Skip to content

Commit

Permalink
Remove old stats writes (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui authored Apr 21, 2024
1 parent 627767f commit 655234e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/deploy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,29 +418,6 @@ async fn recalculate_user(

let new_pp = calculate_new_pp(&scores, score_count);

let stats_table = match rx {
0 => "users_stats",
1 => "rx_stats",
2 => "ap_stats",
_ => unreachable!(),
};

let stats_prefix = match mode {
0 => "std",
1 => "taiko",
2 => "ctb",
3 => "mania",
_ => unreachable!(),
};

sqlx::query(&format!(
"UPDATE {} SET pp_{} = ? WHERE id = ?",
stats_table, stats_prefix
))
.bind(new_pp)
.bind(user_id)
.execute(ctx.database.get().await?.deref_mut())
.await?;
sqlx::query(&format!(
"UPDATE user_stats SET pp = ? WHERE user_id = ? AND mode = ?",
))
Expand Down

0 comments on commit 655234e

Please sign in to comment.