From 546b28cca690b415060f8eac2bd555434a76c195 Mon Sep 17 00:00:00 2001 From: nai-degen <44111-khanon@users.noreply.gitgud.io> Date: Sat, 13 May 2023 13:32:37 -0500 Subject: [PATCH] increases wait time calc window to 90sec --- src/proxy/queue.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proxy/queue.ts b/src/proxy/queue.ts index 5be1011..933d8a9 100644 --- a/src/proxy/queue.ts +++ b/src/proxy/queue.ts @@ -188,7 +188,7 @@ function cleanQueue() { }); const index = waitTimes.findIndex( - (waitTime) => now - waitTime.end > 60 * 1000 + (waitTime) => now - waitTime.end > 90 * 1000 ); const removed = waitTimes.splice(0, index + 1); log.info( @@ -217,7 +217,7 @@ export function trackWaitTime(req: Request) { /** Returns average wait time in milliseconds. */ export function getEstimatedWaitTime() { const now = Date.now(); - const lastMinute = waitTimes.filter((wt) => now - wt.end < 60 * 1000); + const lastMinute = waitTimes.filter((wt) => now - wt.end < 90 * 1000); if (lastMinute.length === 0) { return 0; }