diff options
Diffstat (limited to 'build/database.js')
-rw-r--r-- | build/database.js | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/build/database.js b/build/database.js index 4ba2376..34727f9 100644 --- a/build/database.js +++ b/build/database.js @@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateAccount = exports.fetchAccountFromDiscord = exports.fetchAccount = exports.fetchSession = exports.createSession = exports.finishedCachingAllLeaderboards = exports.finishedCachingRawLeaderboards = exports.queueUpdateDatabaseProfile = exports.queueUpdateDatabaseMember = exports.updateDatabaseProfile = exports.updateDatabaseMember = exports.fetchMemberLeaderboardSpots = exports.fetchLeaderboard = exports.fetchProfileLeaderboard = exports.fetchMemberLeaderboard = exports.fetchAllMemberLeaderboardAttributes = exports.fetchSlayerLeaderboards = exports.fetchAllLeaderboardsCategorized = exports.cachedRawLeaderboards = void 0; +exports.updateAccount = exports.fetchAccountFromDiscord = exports.fetchAccount = exports.fetchSession = exports.createSession = exports.finishedCachingRawLeaderboards = exports.queueUpdateDatabaseProfile = exports.queueUpdateDatabaseMember = exports.updateDatabaseProfile = exports.updateDatabaseMember = exports.fetchMemberLeaderboardSpots = exports.fetchLeaderboard = exports.fetchProfileLeaderboard = exports.fetchMemberLeaderboard = exports.fetchAllMemberLeaderboardAttributes = exports.fetchSlayerLeaderboards = exports.fetchAllLeaderboardsCategorized = exports.cachedRawLeaderboards = void 0; const stats_1 = require("./cleaners/skyblock/stats"); const slayers_1 = require("./cleaners/skyblock/slayers"); const mongodb_1 = require("mongodb"); @@ -538,7 +538,6 @@ async function removeBadMemberLeaderboardAttributes() { } } exports.finishedCachingRawLeaderboards = false; -exports.finishedCachingAllLeaderboards = false; /** Fetch all the leaderboards, used for caching. Don't call this often! */ async function fetchAllLeaderboards(fast) { const leaderboards = await fetchAllMemberLeaderboardAttributes(); @@ -547,20 +546,6 @@ async function fetchAllLeaderboards(fast) { for (const leaderboard of util_1.shuffle(leaderboards)) await fetchMemberLeaderboardRaw(leaderboard); exports.finishedCachingRawLeaderboards = true; - // shuffle so if the application is restarting many times itll still be useful - if (_1.debug) - console.debug('Caching leaderboards!'); - for (const leaderboard of util_1.shuffle(leaderboards)) { - if (!fast) - // wait 2 seconds so it doesnt use as much ram - await util_1.sleep(2 * 1000); - else - await util_1.sleep(500); - await fetchMemberLeaderboard(leaderboard); - } - exports.finishedCachingAllLeaderboards = true; - if (_1.debug) - console.debug('Finished caching leaderboards!'); } async function createSession(refreshToken, userData) { const sessionId = uuid_1.v4(); |