-
Notifications
You must be signed in to change notification settings - Fork 517
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
feat(prerender): support retry
and retryDelay
#1534
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1534 +/- ##
==========================================
- Coverage 76.43% 76.38% -0.05%
==========================================
Files 76 76
Lines 8008 8025 +17
Branches 810 806 -4
==========================================
+ Hits 6121 6130 +9
- Misses 1885 1892 +7
- Partials 2 3 +1
|
Since we use ofetch, i am wondering if we can make use of retry feature. Also was thinking to call it |
The ofetch implementation doesn't support a configurable delay. Should I use it regardless ? |
I am positive to include it upstream. PR also welcome ππΌ |
Tagging as |
4669c0a
to
6d7f8b8
Compare
Thanks for working on this! Just my two cents about |
2766e6b
to
7e42b25
Compare
@pi0 I've rebased this with latest ofetch ππ½ |
28a2123
to
3a0febe
Compare
3a0febe
to
9c02baa
Compare
(we can introduce alias later to ofetch first if makes better sense)
retry
and retryDelay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β€οΈ
π Linked issue
Resolves #1469
β Type of change
π Description
The prerender by default will fail if a page fails to render. This PR changes the default behaviour to 3 attempts before failure.
This also adds 2 configuration options
nitro.options.prerender.tries
andnitro.options.prerender.retryDelay
to change the behaviour.tries
can be set toInifinity
if someones wants the pre-render to try endlessly.For the default values, I've arbitrarily chose 2 retries and a 250ms retry delay.
Additional thoughts
We could nest the options:
nitro.options.prerender.retry.attempts
andnitro.options.prerender.retry.delay
.π Checklist