MCPcopy Create free account
hub / github.com/Effect-TS/effect / countRestart

Function countRestart

packages/effect/src/ui/Query.ts:5970–5984  ·  view source on GitHub ↗
(entry: Entry)

Source from the content-addressed store, hash-verified

5968 }
5969 /** Ten restarts in a row with no settle between are reported, once. */
5970 const countRestart = (entry: Entry): void => {
5971 entry.restarts++
5972 if (entry.restarts === restartLimit) {
5973 const logKey = logKeyOf(entry)
5974 report(
5975 new FetchRestarted({
5976 query: entry.def.name,
5977 logKey,
5978 message: "[Query] the fetch of " + quote(entry.def.name) + " at " +
5979 logKey + " was restarted " +
5980 restartLimit + " times in a row without settling."
5981 })
5982 )
5983 }
5984 }
5985 const save = (entry: Entry, result: Settled): void => {
5986 if (persistence === undefined) return
5987 persistence.save(entry.def, entry.argsKey, result, report)

Callers 2

replaceFetchFunction · 0.85
beginRunFunction · 0.85

Calls 3

logKeyOfFunction · 0.85
reportFunction · 0.70
quoteFunction · 0.70

Tested by

no test coverage detected