From 98d0b1fcda7387c7ccd30a2aaec5cff823e9a3be Mon Sep 17 00:00:00 2001 From: Howard Chung Date: Wed, 24 Apr 2024 23:40:56 -0700 Subject: [PATCH] Update retriever.ts --- svc/retriever.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/svc/retriever.ts b/svc/retriever.ts index 929809ca6..957b55b82 100644 --- a/svc/retriever.ts +++ b/svc/retriever.ts @@ -15,8 +15,9 @@ const app = express(); const steamObj: Record = {}; const minUpTimeSeconds = 300; -const numAccounts = 10; -const matchesPerAccount = 100; +const numAccounts = 6; +const matchesPerAccount = 120; +const accountAttemptMax = 6 const port = config.PORT || config.RETRIEVER_PORT; const getMatchRequestInterval = () => { return Math.ceil(5000 / (Object.keys(steamObj).length || 1)); @@ -150,7 +151,7 @@ app.get('/match/:match_id', async (req, res, cb) => { const client = steamObj[rKey]; matchRequests += 1; // If the selected client has multiple consecutive failures, skip the request - if (matchAttempts[rKey] >= 7) { + if (matchAttempts[rKey] >= accountAttemptMax) { return res.status(500).end(); } res.setHeader('x-match-request-steamid', rKey);