diff options
author | mat-1 <github@matdoes.dev> | 2021-03-02 03:33:14 +0000 |
---|---|---|
committer | mat-1 <github@matdoes.dev> | 2021-03-02 03:33:14 +0000 |
commit | ce66c9a8267505fad530471e5d39607a6c8a736d (patch) | |
tree | 7267edca85bdc4dbb74949443a99adf6112567cf /build/database.js | |
parent | bb2361c0854713e67d0289c24af7d43fec723000 (diff) | |
download | skyblock-api-ce66c9a8267505fad530471e5d39607a6c8a736d.tar.gz skyblock-api-ce66c9a8267505fad530471e5d39607a6c8a736d.tar.bz2 skyblock-api-ce66c9a8267505fad530471e5d39607a6c8a736d.zip |
Compiled TS into JS
Diffstat (limited to 'build/database.js')
-rw-r--r-- | build/database.js | 4 |
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); }); |