MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / allEnvironmentsHealthy

Function allEnvironmentsHealthy

console/src/store/environments.ts:348–355  ·  view source on GitHub ↗
(environments?: EnvironmentsWithHealth)

Source from the content-addressed store, hash-verified

346
347/** True once every enabled environment is healthy. */
348const allEnvironmentsHealthy = (environments?: EnvironmentsWithHealth) => {
349 const enabled = [...(environments?.values() ?? [])].filter(
350 (env): env is EnabledEnvironment => env.state === "enabled",
351 );
352 return (
353 enabled.length > 0 && enabled.every((e) => e.status.health === "healthy")
354 );
355};
356
357/**
358 * Polls for region information and environment health.

Callers 1

usePollEnvironmentHealthFunction · 0.85

Calls 2

filterMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected