diff options
author | mat <github@matdoes.dev> | 2021-05-27 17:37:55 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-05-27 17:37:55 -0500 |
commit | 92194d094fb55f93254706bbabaf3ece15952d98 (patch) | |
tree | ed5bc3a0bba51f68edc2dace88bc4b8e4757f4a2 /src | |
parent | 9f8a070d0cb625aade7bfb47a898ebb89e40b2e0 (diff) | |
download | skyblock-api-92194d094fb55f93254706bbabaf3ece15952d98.tar.gz skyblock-api-92194d094fb55f93254706bbabaf3ece15952d98.tar.bz2 skyblock-api-92194d094fb55f93254706bbabaf3ece15952d98.zip |
log profile in fetchProfileUuid cache miss
Diffstat (limited to 'src')
-rw-r--r-- | src/database.ts | 5 | ||||
-rw-r--r-- | src/hypixelCached.ts | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/database.ts b/src/database.ts index 2c679b6..c461277 100644 --- a/src/database.ts +++ b/src/database.ts @@ -98,6 +98,7 @@ async function connect(): Promise<void> { profileLeaderboardsCollection = database.collection('profile-leaderboards') sessionsCollection = database.collection('sessions') accountsCollection = database.collection('accounts') + console.log('Connected to database :)') } interface StringNumber { @@ -592,12 +593,12 @@ const leaderboardUpdateProfileQueue = new Queue({ }) /** Queue an update for the member's leaderboard data on the server if applicable */ -export async function queueUpdateDatabaseMember(member: CleanMember, profile: CleanFullProfile): Promise<void> { +export function queueUpdateDatabaseMember(member: CleanMember, profile: CleanFullProfile): void { leaderboardUpdateMemberQueue.enqueue(async() => await updateDatabaseMember(member, profile)) } /** Queue an update for the profile's leaderboard data on the server if applicable */ -export async function queueUpdateDatabaseProfile(profile: CleanFullProfile): Promise<void> { +export function queueUpdateDatabaseProfile(profile: CleanFullProfile): void { leaderboardUpdateProfileQueue.enqueue(async() => await updateDatabaseProfile(profile)) } diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts index 6296dba..fd11a70 100644 --- a/src/hypixelCached.ts +++ b/src/hypixelCached.ts @@ -274,7 +274,7 @@ export async function fetchProfileUuid(user: string, profile: string): Promise<s return null } - if (debug) console.debug('Cache miss: fetchProfileUuid', user) + if (debug) console.debug('Cache miss: fetchProfileUuid', user, profile) const profiles = await fetchBasicProfiles(user) if (!profiles) return // user probably doesnt exist |