From 978d0f26e0264bf8bb0a9d730907986985473e39 Mon Sep 17 00:00:00 2001 From: "Ean Milligan (Bastion)" Date: Sat, 29 Apr 2023 00:19:24 -0400 Subject: [PATCH] increase polling rate for events --- src/events/ready.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/ready.ts b/src/events/ready.ts index b0cd5dd..2a3ba3d 100644 --- a/src/events/ready.ts +++ b/src/events/ready.ts @@ -37,7 +37,7 @@ export const ready = (rawBot: Bot) => { }).catch((e) => log(LT.ERROR, `Failed to update status (in interval): ${utils.jsonStringifyBig(e)}`)); }, 30000); - // Interval to handle event notifications and cleanup every minute + // Interval to handle event notifications and cleanup every 30 seconds if (notificationIntervalId) clearInterval(notificationIntervalId); notificationIntervalId = setInterval(async () => { log(LT.LOG, 'Running notification system'); @@ -58,7 +58,7 @@ export const ready = (rawBot: Bot) => { eventsToLock?.rows?.forEach((event) => lockEvent(bot, event as ActiveEvent)); eventsToDelete?.rows?.forEach((event) => deleteEvent(bot, event as ActiveEvent)); eventFailuresToHandle?.rows?.forEach((event) => handleFailures(bot, event as ActiveEvent)); - }, 60000); + }, 30000); // setTimeout added to make sure the startup message does not error out setTimeout(() => {