MCPcopy Create free account
hub / github.com/MathMan05/Fermi / resolveInstance

Function resolveInstance

src/stats.ts:79–93  ·  view source on GitHub ↗
(instance: Instance, activeInstances: Set<string>)

Source from the content-addressed store, hash-verified

77}
78
79async function resolveInstance(instance: Instance, activeInstances: Set<string>): Promise<void> {
80 try {
81 calcStats(instance);
82 const api = await getApiUrl(instance);
83 if (!api) {
84 handleUnresolvedApi(instance);
85 return;
86 }
87 activeInstances.add(instance.name);
88 await checkHealth(instance, api);
89 scheduleHealthCheck(instance, api);
90 } catch (error) {
91 console.error("Error resolving instance:", error);
92 }
93}
94
95async function getApiUrl(instance: Instance): Promise<string | null> {
96 if (instance.urls) {

Callers 2

observeFunction · 0.85
handleUnresolvedApiFunction · 0.85

Calls 7

calcStatsFunction · 0.85
getApiUrlFunction · 0.85
handleUnresolvedApiFunction · 0.85
checkHealthFunction · 0.85
scheduleHealthCheckFunction · 0.85
addMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected