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

Retry failed routes during prerendering #1469

Closed
1 task
rudolfbyker opened this issue Jul 21, 2023 · 1 comment · Fixed by #1534
Closed
1 task

Retry failed routes during prerendering #1469

rudolfbyker opened this issue Jul 21, 2023 · 1 comment · Fixed by #1534
Labels

Comments

@rudolfbyker
Copy link

Describe the feature

When prerendering a large number of routes, it would be very beneficial to be able to automatically retry failed routes. Routes may fail spuriously due to a myriad of reasons, especially temporary 5XX errors from APIs. If a single page out of a few thousand has this problem, everything needs to be prerendered from scratch again.

Proposed config change: Add something like retries: number here https://github.com/unjs/nitro/blob/14670c94d8f11f24525295f55ed427ac616fc643/src/types/nitro.ts#L252C8-L252C8 . 0 will give the current behaviour. 1 will give it two attempts before failing. -1 will let it retry each route indefinitely.

Additional information

  • Would you be willing to help implement this feature?
@rudolfbyker
Copy link
Author

Better config proposal: Add tries: number here https://github.com/unjs/nitro/blob/14670c94d8f11f24525295f55ed427ac616fc643/src/types/nitro.ts#L252C8-L252C8 . 1 will give the current behaviour. 2 will give it two attempts before failing. 0 will let it retry each route indefinitely.

I think this is less confusing than calling it retries and shifting everything by one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants