aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-04-10 20:22:07 -0500
committermat <github@matdoes.dev>2022-04-10 20:22:07 -0500
commitf7f6fc046f46e1d7d5611b7bf352a1f549489d90 (patch)
treea2fc0024618d3f4155e51226872777525c4a594d /src
parentfffdfd3a9690fa1a491e8a45472162e770462ea3 (diff)
downloadskyblock-api-f7f6fc046f46e1d7d5611b7bf352a1f549489d90.tar.gz
skyblock-api-f7f6fc046f46e1d7d5611b7bf352a1f549489d90.tar.bz2
skyblock-api-f7f6fc046f46e1d7d5611b7bf352a1f549489d90.zip
Increase concurrency on member leaderboard queue
Diffstat (limited to 'src')
-rw-r--r--src/database.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/database.ts b/src/database.ts
index 2944728..6e37d5f 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -778,13 +778,13 @@ export async function updateDatabaseMember(member: CleanMember, profile: CleanFu
if (debug) console.debug('adding member to leaderboards', member.username)
if (member.rawHypixelStats)
- 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))
- await constants.addZones(member.zones.map(zone => zone.name))
- await constants.addSlayers(member.slayers.bosses.map(s => s.rawName))
- await constants.addPets(member.pets.list.map(s => s.id))
- await constants.addHarpSongs(member.harp.songs.map(s => s.id))
+ constants.addStats(Object.keys(member.rawHypixelStats))
+ constants.addCollections(member.collections.map(coll => coll.name))
+ constants.addSkills(member.skills.map(skill => skill.name))
+ constants.addZones(member.zones.map(zone => zone.name))
+ constants.addSlayers(member.slayers.bosses.map(s => s.rawName))
+ constants.addPets(member.pets.list.map(s => s.id))
+ constants.addHarpSongs(member.harp.songs.map(s => s.id))
if (debug) console.debug('done constants..')
@@ -908,7 +908,7 @@ export async function updateDatabaseProfile(profile: CleanFullProfile): Promise<
}
export const leaderboardUpdateMemberQueue = new Queue({
- concurrent: 1,
+ concurrent: 2,
interval: 50
})
export const leaderboardUpdateProfileQueue = new Queue({