MCPcopy Create free account
hub / github.com/dfinity/orbit / assertReplicaIsHealthy

Function assertReplicaIsHealthy

cli/src/utils.ts:74–82  ·  view source on GitHub ↗
(network: string)

Source from the content-addressed store, hash-verified

72};
73
74export const assertReplicaIsHealthy = async (network: string): Promise<void> => {
75 const ping: { replica_health_status?: string } = JSON.parse(
76 await execAsync(`dfx ping '${network}'`),
77 );
78
79 if (ping.replica_health_status?.toLowerCase() !== 'healthy') {
80 throw new Error('The replica is not healthy.');
81 }
82};
83
84export const commandExists = (command: string): boolean => {
85 try {

Callers 3

list.tsFile · 0.90
remove.tsFile · 0.90
publish.tsFile · 0.90

Calls 2

execAsyncFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected