MCPcopy Create free account
hub / github.com/PostHog/duckgres / atOrgWorkerCap

Method atOrgWorkerCap

controlplane/org_reserved_pool.go:285–289  ·  view source on GitHub ↗

atOrgWorkerCap reports whether the org has reached its maximum concurrent workers (count cap). Hot-idle workers are excluded (they don't consume the count budget), so a true result means every counted worker is actively assigned — a new worker cannot be added.

()

Source from the content-addressed store, hash-verified

283 worker.activeSessions--
284 }
285 p.shared.mu.Unlock()
286 if !owned {
287 return orgAcquireOutcome{retry: true}
288 }
289 return orgAcquireOutcome{worker: worker}
290}
291
292// atOrgWorkerCap reports whether the org has reached its maximum concurrent

Callers 1

acquireDecisionMethod · 0.95

Calls 1

Tested by

no test coverage detected