MCPcopy Create free account
hub / github.com/tiann/hapi / getOrCreateMachine

Method getOrCreateMachine

hub/src/sync/machineCache.ts:45–48  ·  view source on GitHub ↗
(id: string, metadata: unknown, runnerState: unknown, namespace: string)

Source from the content-addressed store, hash-verified

43 }
44
45 getOrCreateMachine(id: string, metadata: unknown, runnerState: unknown, namespace: string): Machine {
46 const stored = this.store.machines.getOrCreateMachine(id, metadata, runnerState, namespace)
47 return this.refreshMachine(stored.id) ?? (() => { throw new Error('Failed to load machine') })()
48 }
49
50 refreshMachine(machineId: string): Machine | null {
51 const stored = this.store.machines.getMachine(machineId)

Callers

nothing calls this directly

Calls 1

refreshMachineMethod · 0.95

Tested by

no test coverage detected