diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2021-03-01 21:32:51 -0600 |
|---|---|---|
| committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-03-01 21:32:51 -0600 |
| commit | 10b7aa783bcefd1b055202b3e6d00c4a352c800f (patch) | |
| tree | 7267edca85bdc4dbb74949443a99adf6112567cf | |
| parent | bb2361c0854713e67d0289c24af7d43fec723000 (diff) | |
| download | skyblock-api-10b7aa783bcefd1b055202b3e6d00c4a352c800f.tar.gz skyblock-api-10b7aa783bcefd1b055202b3e6d00c4a352c800f.tar.bz2 skyblock-api-10b7aa783bcefd1b055202b3e6d00c4a352c800f.zip | |
Update 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); }); |
