Skip to content

Commit

Permalink
Update retriever.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Apr 25, 2024
1 parent a90eb5a commit 98d0b1f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions svc/retriever.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const app = express();
const steamObj: Record<string, SteamUser> = {};
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));
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 98d0b1f

Please sign in to comment.