MCPcopy
hub / github.com/vercel/next.js / retry

Function retry

scripts/devlow-bench.mjs:595–609  ·  scripts/devlow-bench.mjs::retry
(fn)

Source from the content-addressed store, hash-verified

593)
594
595async function retry(fn) {
596 let lastError
597 for (let i = 100; i < 2000; i += 100) {
598 try {
599 await fn()
600 return
601 } catch (e) {
602 lastError = e
603 await new Promise((resolve) => {
604 setTimeout(resolve, i)
605 })
606 }
607 }
608 throw lastError
609}
610
611function measureTime(name, options) {
612 return devlow.measureTime(name, {

Callers 2

nextBuildWorkflowFunction · 0.70
nextDevWorkflowFunction · 0.70

Calls 2

fnFunction · 0.50
setTimeoutFunction · 0.50

Tested by

no test coverage detected