aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-07-13 04:46:27 -0500
committermat <github@matdoes.dev>2021-07-13 04:46:27 -0500
commit956172c785cae078012f82733f8188ece8f59696 (patch)
tree2067497b232ca31e12b0ec9fc5a1c381dbd45c79
parent05a189a374d40a9e3054d85d6e397d748b5664f5 (diff)
downloadskyblock-api-956172c785cae078012f82733f8188ece8f59696.tar.gz
skyblock-api-956172c785cae078012f82733f8188ece8f59696.tar.bz2
skyblock-api-956172c785cae078012f82733f8188ece8f59696.zip
increase max listeners because what could go wrong
-rw-r--r--build/hypixelCached.js4
-rw-r--r--package-lock.json20
-rw-r--r--src/hypixelCached.ts4
3 files changed, 14 insertions, 14 deletions
diff --git a/build/hypixelCached.js b/build/hypixelCached.js
index d54aa68..4b048e8 100644
--- a/build/hypixelCached.js
+++ b/build/hypixelCached.js
@@ -40,7 +40,7 @@ exports.usernameCache = new node_cache_1.default({
checkperiod: 60,
useClones: false,
});
-exports.usernameCache.setMaxListeners(20);
+exports.usernameCache.setMaxListeners(50);
exports.basicProfilesCache = new node_cache_1.default({
stdTTL: 60 * 10,
checkperiod: 60,
@@ -244,7 +244,7 @@ async function fetchBasicProfiles(user) {
console.debug('Cache miss: fetchBasicProfiles', user);
const player = await fetchPlayer(playerUuid);
if (!player) {
- console.log('bruh playerUuid', user);
+ console.log('bruh playerUuid', user, playerUuid);
return [];
}
const profiles = player.profiles;
diff --git a/package-lock.json b/package-lock.json
index 29a1921..8bb2f7d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1336,16 +1336,6 @@
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
},
- "string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
- "dev": true,
- "requires": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- }
- },
"string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -1361,6 +1351,16 @@
}
}
},
+ "string-width": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "dev": true,
+ "requires": {
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ }
+ },
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts
index 4aa96ef..b0fc1db 100644
--- a/src/hypixelCached.ts
+++ b/src/hypixelCached.ts
@@ -21,7 +21,7 @@ export const usernameCache = new NodeCache({
useClones: false,
})
-usernameCache.setMaxListeners(20)
+usernameCache.setMaxListeners(50)
export const basicProfilesCache = new NodeCache({
stdTTL: 60 * 10,
@@ -260,7 +260,7 @@ async function fetchBasicProfiles(user: string): Promise<CleanBasicProfile[] | n
const player = await fetchPlayer(playerUuid)
if (!player) {
- console.log('bruh playerUuid', user)
+ console.log('bruh playerUuid', user, playerUuid)
return []
}
const profiles = player.profiles