fix: resume tournament result polling after delayed codes
This commit is contained in:
1 parent
e50a683336
commit
2984bd1604
8 files changed
+207
-21
No files matched your search
@@ -23,6 +23,7 @@ import {
|
||||
resolveRoundRobinTeamCount,
|
||||
} from '../tournament-code/round-robin.util';
|
||||
import {
|
||||
collectCaptainAndLimitedTeamMemberUserIds,
|
||||
collectCaptainUserIds,
|
||||
collectMatchUserIds,
|
||||
computeGameResult,
|
||||
@@ -34,10 +35,11 @@ import type {
|
||||
PollTournamentResultJob,
|
||||
} from './tournament-result.types';
|
||||
|
||||
const FIRST_HOUR_POLL_DELAY_MS = 5 * 60_000;
|
||||
const FIRST_HOUR_POLL_DELAY_MS = 2 * 60_000;
|
||||
const LATER_POLL_DELAY_MS = 60 * 60_000;
|
||||
const POLL_EXPIRY_MS = 24 * 60 * 60_000;
|
||||
const EXPAND_AFTER_MS = 60 * 60_000;
|
||||
const EXPANDED_MEMBER_LIMIT_PER_TEAM = 2;
|
||||
const TOURNAMENT_LOOKUP_START_MARGIN_SECONDS = 60;
|
||||
|
||||
interface ManualGameAssignment {
|
||||
@@ -216,7 +218,13 @@ export class TournamentResultService {
|
||||
const region = community?.riotRegion ?? 'asia';
|
||||
const lookup = await this.buildPuuidLookup(match);
|
||||
const puuids = job.expandedToAllPuuids
|
||||
? this.collectPollingPuuids(collectMatchUserIds(match), lookup)
|
||||
? this.collectPollingPuuids(
|
||||
collectCaptainAndLimitedTeamMemberUserIds(
|
||||
match,
|
||||
EXPANDED_MEMBER_LIMIT_PER_TEAM,
|
||||
),
|
||||
lookup,
|
||||
)
|
||||
: this.collectPollingPuuids(collectCaptainUserIds(match), lookup);
|
||||
|
||||
const matchedGameNumbers = new Set<number>();
|
||||
|
||||
Reference in new issue
Block a user