MCPcopy Create free account
hub / github.com/code-pushup/cli / isCoordinatorProcess

Method isCoordinatorProcess

packages/utils/src/lib/wal-sharded.ts:159–161  ·  view source on GitHub ↗

* Determines if this process is the leader WAL process. * * The leader is the process that first enabled profiling over the given env var. * All descendant processes inherit the environment. * * @param envVarName - Environment variable name for storing coordinator ID * @param insta

(envVarName: string, instanceID: string)

Source from the content-addressed store, hash-verified

157 * @returns true if this is the leader WAL process, false otherwise
158 */
159 static isCoordinatorProcess(envVarName: string, instanceID: string): boolean {
160 return process.env[envVarName] === instanceID;
161 }
162
163 /**
164 * Create a sharded WAL manager.

Callers 1

isCoordinatorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected