MCPcopy Create free account
hub / github.com/Effect-TS/effect / updateShardsGauge

Function updateShardsGauge

packages/cluster/src/Sharding.ts:233–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231 // the active shards are the ones that we have acquired the lock for
232 const acquiredShards = MutableHashSet.empty<ShardId>()
233 const updateShardsGauge = () => ClusterMetrics.shards.unsafeUpdate(BigInt(MutableHashSet.size(acquiredShards)), [])
234 const activeShardsLatch = yield* Effect.makeLatch(false)
235 // set once shutdown starts handing every shard off
236 let handingOff = false

Callers 2

Sharding.tsFile · 0.85
markShardLocksUnhealthyFunction · 0.85

Calls 2

unsafeUpdateMethod · 0.80
sizeMethod · 0.65

Tested by

no test coverage detected