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

Method setCoordinatorProcess

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

* Initialize the given environment variable if not already set. * This must be done as early as possible before any user code runs. * Sets envVarName to the current instance ID if not already defined. * * @param envVarName - Environment variable name for storing coordinator ID * @para

(envVarName: string, instanceID: string)

Source from the content-addressed store, hash-verified

141 * @param instanceID - The instance ID to set as coordinator
142 */
143 static setCoordinatorProcess(envVarName: string, instanceID: string): void {
144 if (!process.env[envVarName]) {
145 process.env[envVarName] = instanceID;
146 }
147 }
148
149 /**
150 * Determines if this process is the leader WAL process.

Callers 2

constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected