1 parent
a8f689e39c
commit
c340aec110
59 files changed
+1108
-1590
No files matched your search
+3
-3
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Which Geek2API entry point a request goes to.
|
||||
* Which InfStarAPI entry point a request goes to.
|
||||
*
|
||||
* Every entry point fronts the same gateway, so any of them can serve any
|
||||
* request. The pool keeps them ordered: hosts are ranked by their last
|
||||
@@ -155,7 +155,7 @@ export function createHostPool({
|
||||
if (typeof host !== 'string' || !configured().includes(host)) return
|
||||
cooling.set(host, now() + cooldownMs)
|
||||
latency.delete(host)
|
||||
logger?.warn?.('geek2api: host %s failed in transit (%s); the next host serves the retry', host, reason ?? 'transport')
|
||||
logger?.warn?.('infstarapi: host %s failed in transit (%s); the next host serves the retry', host, reason ?? 'transport')
|
||||
}
|
||||
|
||||
const succeed = host => {
|
||||
@@ -190,7 +190,7 @@ export function createHostPool({
|
||||
tried.push(`${host}: ${error instanceof Error ? error.message : String(error)}`)
|
||||
}
|
||||
}
|
||||
throw new Error(`no Geek2API host answered (${tried.join('; ')})`)
|
||||
throw new Error(`no InfStarAPI host answered (${tried.join('; ')})`)
|
||||
}
|
||||
|
||||
/** What the settings panel shows: each host, its latency, and whether it is set aside. */
|
||||
|
||||
Reference in new issue
Block a user