aboutsummaryrefslogtreecommitdiff
path: root/build/database.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/database.js')
-rw-r--r--build/database.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/build/database.js b/build/database.js
index 11192f0..c3f2518 100644
--- a/build/database.js
+++ b/build/database.js
@@ -291,6 +291,8 @@ async function fetchAllLeaderboards() {
connect().then(() => {
// when it connects, cache the leaderboards and remove bad members
removeBadMemberLeaderboardAttributes();
- // cache leaderboard players every hour
+ // cache leaderboards on startup so its faster later on
+ fetchAllLeaderboards();
+ // cache leaderboard players again every hour
setInterval(fetchAllLeaderboards, 4 * 60 * 60 * 1000);
});