From ec09e39858e2ef571f2c5b67e97928ef933925c8 Mon Sep 17 00:00:00 2001 From: Morgan Bazalgette Date: Sat, 30 Dec 2017 21:55:24 +0100 Subject: [PATCH] ho ho ho what will it be? --- calculate_overall_accuracy.go | 5 +---- calculate_pp.go | 3 --- haspp.go | 3 --- redis.go | 2 +- 4 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 haspp.go diff --git a/calculate_overall_accuracy.go b/calculate_overall_accuracy.go index b06eaf1..23708e0 100644 --- a/calculate_overall_accuracy.go +++ b/calculate_overall_accuracy.go @@ -17,10 +17,7 @@ type calculateOverallAccuracyElement struct { } func (c calculateOverallAccuracyElement) g() float64 { - if hasPP(c.mode) { - return *c.pp - } - return *c.accuracy + return *c.pp } type coaeCollection []calculateOverallAccuracyElement diff --git a/calculate_pp.go b/calculate_pp.go index 61c92a1..46b3dd1 100644 --- a/calculate_pp.go +++ b/calculate_pp.go @@ -61,9 +61,6 @@ func opCalculatePP() { for userid, pps := range users { for mode, ppUM := range *pps { - if !hasPP(mode) { - continue - } op("UPDATE users_stats SET pp_"+modeToString(mode)+" = ? WHERE id = ?", ppUM.ppTotal, userid) } } diff --git a/haspp.go b/haspp.go deleted file mode 100644 index 4dc271b..0000000 --- a/haspp.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -func hasPP(mode int) bool { return mode != 2 } diff --git a/redis.go b/redis.go index b9c71ca..d793cdf 100644 --- a/redis.go +++ b/redis.go @@ -31,7 +31,7 @@ func opPopulateRedis() { const initQuery = ` SELECT users_stats.id, users_stats.country, pp_std, - pp_taiko, ranked_score_ctb, pp_mania, + pp_taiko, pp_ctb, pp_mania, playcount_std, playcount_taiko, playcount_ctb, playcount_mania, users.latest_activity FROM users_stats INNER JOIN users ON users.id = users_stats.id WHERE privileges & 1 > 0` -- GitLab