aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-05-29 22:56:21 -0500
committermat <github@matdoes.dev>2021-05-29 22:56:21 -0500
commit776a3ab5f6d717d88691044732d2a9d00f1ca772 (patch)
tree6325a3e0684e6d590dd56f3354de25ecd239b63a
parent364eab6e95b722f4293110e5fa5063c6b15ad9ef (diff)
downloadskyblock-api-776a3ab5f6d717d88691044732d2a9d00f1ca772.tar.gz
skyblock-api-776a3ab5f6d717d88691044732d2a9d00f1ca772.tar.bz2
skyblock-api-776a3ab5f6d717d88691044732d2a9d00f1ca772.zip
only cache raw leaderboards
-rw-r--r--build/database.js1
-rw-r--r--src/database.ts1
2 files changed, 2 insertions, 0 deletions
diff --git a/build/database.js b/build/database.js
index 8e3beb9..7e7331c 100644
--- a/build/database.js
+++ b/build/database.js
@@ -533,6 +533,7 @@ async function fetchAllLeaderboards(fast) {
for (const leaderboard of util_1.shuffle(leaderboards))
await fetchMemberLeaderboardRaw(leaderboard);
exports.finishedCachingRawLeaderboards = true;
+ return;
// shuffle so if the application is restarting many times itll still be useful
if (_1.debug)
console.debug('Caching leaderboards!');
diff --git a/src/database.ts b/src/database.ts
index 01dec3c..2acfee5 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -670,6 +670,7 @@ async function fetchAllLeaderboards(fast?: boolean): Promise<void> {
for (const leaderboard of shuffle(leaderboards))
await fetchMemberLeaderboardRaw(leaderboard)
finishedCachingRawLeaderboards = true
+ return
// shuffle so if the application is restarting many times itll still be useful
if (debug) console.debug('Caching leaderboards!')