aboutsummaryrefslogtreecommitdiff
path: root/build/database.js
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-01 16:54:25 -0500
committermat <github@matdoes.dev>2021-06-01 16:54:25 -0500
commitac1a21f5ec551b8cfe7a58611301b7f2742269d0 (patch)
tree46c8a6fc8a2676274d1b0d2a58ca4dd5324ff213 /build/database.js
parent04d79fe41fae83eed8f17eda97e4e4827dc79e92 (diff)
downloadskyblock-api-ac1a21f5ec551b8cfe7a58611301b7f2742269d0.tar.gz
skyblock-api-ac1a21f5ec551b8cfe7a58611301b7f2742269d0.tar.bz2
skyblock-api-ac1a21f5ec551b8cfe7a58611301b7f2742269d0.zip
add queue sizes to index debug data
Diffstat (limited to 'build/database.js')
-rw-r--r--build/database.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/build/database.js b/build/database.js
index 7c7d192..51171cc 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.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.leaderboardUpdateProfileQueue = exports.leaderboardUpdateMemberQueue = 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");
@@ -502,22 +502,22 @@ async function updateDatabaseProfile(profile) {
console.debug('added profile to leaderboards', profile.name, leaderboardAttributes);
}
exports.updateDatabaseProfile = updateDatabaseProfile;
-const leaderboardUpdateMemberQueue = new queue_promise_1.default({
+exports.leaderboardUpdateMemberQueue = new queue_promise_1.default({
concurrent: 1,
interval: 2000
});
-const leaderboardUpdateProfileQueue = new queue_promise_1.default({
+exports.leaderboardUpdateProfileQueue = new queue_promise_1.default({
concurrent: 1,
interval: 10000
});
/** Queue an update for the member's leaderboard data on the server if applicable */
function queueUpdateDatabaseMember(member, profile) {
- leaderboardUpdateMemberQueue.enqueue(async () => await updateDatabaseMember(member, profile));
+ exports.leaderboardUpdateMemberQueue.enqueue(async () => await updateDatabaseMember(member, profile));
}
exports.queueUpdateDatabaseMember = queueUpdateDatabaseMember;
/** Queue an update for the profile's leaderboard data on the server if applicable */
function queueUpdateDatabaseProfile(profile) {
- leaderboardUpdateProfileQueue.enqueue(async () => await updateDatabaseProfile(profile));
+ exports.leaderboardUpdateProfileQueue.enqueue(async () => await updateDatabaseProfile(profile));
}
exports.queueUpdateDatabaseProfile = queueUpdateDatabaseProfile;
/**