diff options
author | mat <github@matdoes.dev> | 2021-06-01 17:11:48 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-06-01 17:11:48 -0500 |
commit | aeb5f0d176d11a3b15d98e136ad9e420fd6cb416 (patch) | |
tree | 5344bc05b6aba03bd6461844535b8a48932d8d7a /build | |
parent | decb1a1ee1a35505db7cb573031dd6986d15cdbe (diff) | |
download | skyblock-api-aeb5f0d176d11a3b15d98e136ad9e420fd6cb416.tar.gz skyblock-api-aeb5f0d176d11a3b15d98e136ad9e420fd6cb416.tar.bz2 skyblock-api-aeb5f0d176d11a3b15d98e136ad9e420fd6cb416.zip |
don't queue stuff if it's in recentlyUpdated
Diffstat (limited to 'build')
-rw-r--r-- | build/database.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build/database.js b/build/database.js index f3d676c..381be7c 100644 --- a/build/database.js +++ b/build/database.js @@ -512,11 +512,15 @@ exports.leaderboardUpdateProfileQueue = new queue_promise_1.default({ }); /** Queue an update for the member's leaderboard data on the server if applicable */ function queueUpdateDatabaseMember(member, profile) { + if (recentlyUpdated.get(profile.uuid + member.uuid)) + return; 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) { + if (recentlyUpdated.get(profile.uuid + 'profile')) + return; exports.leaderboardUpdateProfileQueue.enqueue(async () => await updateDatabaseProfile(profile)); } exports.queueUpdateDatabaseProfile = queueUpdateDatabaseProfile; |