diff options
author | mat <github@matdoes.dev> | 2021-06-01 17:04:54 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-06-01 17:04:54 -0500 |
commit | 3c5b48d5417e8d6e78507783cee62e9830548778 (patch) | |
tree | ab76dba3810dcd625b0dd5ce6b7d5668e14e9973 | |
parent | ac1a21f5ec551b8cfe7a58611301b7f2742269d0 (diff) | |
download | skyblock-api-3c5b48d5417e8d6e78507783cee62e9830548778.tar.gz skyblock-api-3c5b48d5417e8d6e78507783cee62e9830548778.tar.bz2 skyblock-api-3c5b48d5417e8d6e78507783cee62e9830548778.zip |
decrease the queue intervals by a lot
-rw-r--r-- | build/database.js | 6 | ||||
-rw-r--r-- | src/database.ts | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/build/database.js b/build/database.js index 51171cc..252181e 100644 --- a/build/database.js +++ b/build/database.js @@ -33,9 +33,9 @@ const cached = __importStar(require("./hypixelCached")); const constants = __importStar(require("./constants")); const util_1 = require("./util"); const node_cache_1 = __importDefault(require("node-cache")); +const uuid_1 = require("uuid"); const queue_promise_1 = __importDefault(require("queue-promise")); const _1 = require("."); -const uuid_1 = require("uuid"); // don't update the user for 3 minutes const recentlyUpdated = new node_cache_1.default({ stdTTL: 60 * 3, @@ -504,11 +504,11 @@ async function updateDatabaseProfile(profile) { exports.updateDatabaseProfile = updateDatabaseProfile; exports.leaderboardUpdateMemberQueue = new queue_promise_1.default({ concurrent: 1, - interval: 2000 + interval: 100 }); exports.leaderboardUpdateProfileQueue = new queue_promise_1.default({ concurrent: 1, - interval: 10000 + interval: 500 }); /** Queue an update for the member's leaderboard data on the server if applicable */ function queueUpdateDatabaseMember(member, profile) { diff --git a/src/database.ts b/src/database.ts index 661b806..e88614d 100644 --- a/src/database.ts +++ b/src/database.ts @@ -13,9 +13,9 @@ import * as constants from './constants' import { shuffle, sleep } from './util' import * as discord from './discord' import NodeCache from 'node-cache' +import { v4 as uuid4 } from 'uuid' import Queue from 'queue-promise' import { debug } from '.' -import { v4 as uuid4 } from 'uuid' // don't update the user for 3 minutes const recentlyUpdated = new NodeCache({ @@ -653,11 +653,11 @@ export async function updateDatabaseProfile(profile: CleanFullProfile): Promise< export const leaderboardUpdateMemberQueue = new Queue({ concurrent: 1, - interval: 2000 + interval: 100 }) export const leaderboardUpdateProfileQueue = new Queue({ concurrent: 1, - interval: 10000 + interval: 500 }) /** Queue an update for the member's leaderboard data on the server if applicable */ |