Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TM-1513] add attemps for delayed jobs #703

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

egrojMonroy
Copy link
Collaborator

After a 502 on getting job status, try 3 times .

Copy link

vercel bot commented Nov 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wri-terramatch-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 5:27pm
wri-terramatch-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 5:27pm

src/generated/apiFetcher.ts Show resolved Hide resolved
@@ -136,7 +136,7 @@ type JobResult = {
};
};

async function loadJob(signal: AbortSignal | undefined, delayedJobId: string): Promise<JobResult> {
async function loadJob(signal: AbortSignal | undefined, delayedJobId: string, retries: number = 3): Promise<JobResult> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎨 There's no reason to specify the type when a default value is provided; TS compiler will do just fine understanding it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@egrojMonroy egrojMonroy merged commit 1c8c356 into staging Nov 26, 2024
4 checks passed
@egrojMonroy egrojMonroy deleted the fix/TM-1513-attemps-jobs branch November 26, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants