aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/database.js6
-rw-r--r--src/database.ts4
2 files changed, 9 insertions, 1 deletions
diff --git a/build/database.js b/build/database.js
index c3f2518..25f0b24 100644
--- a/build/database.js
+++ b/build/database.js
@@ -211,6 +211,8 @@ async function updateDatabaseMember(member, profile) {
return;
// store the member in recentlyUpdated so it cant update for 3 more minutes
recentlyUpdated.set(profile.uuid + member.uuid, true);
+ if (_1.debug)
+ console.log('adding member to leaderboards', member.username);
await constants.addStats(Object.keys(member.rawHypixelStats));
await constants.addCollections(member.collections.map(coll => coll.name));
await constants.addSkills(member.skills.map(skill => skill.name));
@@ -240,10 +242,12 @@ async function updateDatabaseMember(member, profile) {
.slice(0, 100);
cachedRawLeaderboards.set(attributeName, newRawLeaderboard);
}
+ if (_1.debug)
+ console.log('added member to leaderboards', member.username, leaderboardAttributes);
}
exports.updateDatabaseMember = updateDatabaseMember;
const queue = new queue_promise_1.default({
- concurrent: 3,
+ concurrent: 10,
interval: 500
});
/** Queue an update for the member's leaderboard data on the server if applicable */
diff --git a/src/database.ts b/src/database.ts
index 35f78b2..09288e5 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -231,6 +231,8 @@ export async function updateDatabaseMember(member: CleanMember, profile: CleanFu
// store the member in recentlyUpdated so it cant update for 3 more minutes
recentlyUpdated.set(profile.uuid + member.uuid, true)
+ if (debug) console.log('adding member to leaderboards', member.username)
+
await constants.addStats(Object.keys(member.rawHypixelStats))
await constants.addCollections(member.collections.map(coll => coll.name))
await constants.addSkills(member.skills.map(skill => skill.name))
@@ -267,6 +269,8 @@ export async function updateDatabaseMember(member: CleanMember, profile: CleanFu
.slice(0, 100)
cachedRawLeaderboards.set(attributeName, newRawLeaderboard)
}
+
+ if (debug) console.log('added member to leaderboards', member.username, leaderboardAttributes)
}
const queue = new Queue({