aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-01 17:11:48 -0500
committermat <github@matdoes.dev>2021-06-01 17:11:48 -0500
commitaeb5f0d176d11a3b15d98e136ad9e420fd6cb416 (patch)
tree5344bc05b6aba03bd6461844535b8a48932d8d7a /build
parentdecb1a1ee1a35505db7cb573031dd6986d15cdbe (diff)
downloadskyblock-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.js4
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;