From 7e8b7a02d41dbd5fa6da5d0e8dcc3dea19036c06 Mon Sep 17 00:00:00 2001 From: Mia <49593536+mia-pi-git@users.noreply.github.com> Date: Tue, 24 Dec 2024 02:01:51 -0600 Subject: [PATCH] Artemis: Stop throwing 429 errors We already throttle requests when we get 429s. We don't need to log it constantly too. --- server/artemis/remote.ts | 8 ++++---- server/room-battle.ts | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/server/artemis/remote.ts b/server/artemis/remote.ts index 23bbc73008e3..2e0246f2fe6e 100644 --- a/server/artemis/remote.ts +++ b/server/artemis/remote.ts @@ -57,7 +57,7 @@ let throttleTime: number | null = null; export const limiter = new Limiter(800); export const PM = new ProcessManager.QueryProcessManager | null>(module, async text => { if (isCommon(text) || !limiter.shouldRequest()) return null; - if (throttleTime && (Date.now() - throttleTime < 10000)) { + if (throttleTime && ((Date.now() - throttleTime) < 10000)) { return null; } if (throttleTime) throttleTime = null; @@ -90,9 +90,9 @@ export const PM = new ProcessManager.QueryProcessManager 0) continue; if (this.settings.timeoutAutoChoose && player.secondsLeft > 0 && player.knownActive) { void this.battle.stream.write(`>${player.slot} default`);