Skip to content

Commit

Permalink
make noretry a param
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed May 24, 2024
1 parent b217127 commit 42af941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions store/getApiData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export async function tryFetchApiData(
* @param matchId
* @returns
*/
export async function getOrFetchApiData(matchId: number): Promise<{
export async function getOrFetchApiData(matchId: number, noRetry = false): Promise<{
data: ApiMatch | null;
error: string | null;
pgroup: PGroup | null;
Expand All @@ -108,7 +108,7 @@ export async function getOrFetchApiData(matchId: number): Promise<{
}
}
// If we got here we don't have it saved or want to refetch
const { error, pgroup } = await saveApiData(matchId, true);
const { error, pgroup } = await saveApiData(matchId, noRetry);
if (error) {
// We caught an exception from Steam API due to invalid ID
return { data: null, error, pgroup };
Expand Down
2 changes: 1 addition & 1 deletion svc/gcdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getOrFetchApiData } from '../store/getApiData';

async function processGcData(job: GcDataJob) {
const matchId = job.match_id;
const { pgroup } = await getOrFetchApiData(matchId);
const { pgroup } = await getOrFetchApiData(matchId, true);
if (!pgroup) {
return;
}
Expand Down

0 comments on commit 42af941

Please sign in to comment.