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

Method WorkerProfile

controlplane/session_mgr.go:995–1001  ·  view source on GitHub ↗

WorkerProfile returns the pod-shape profile (cpu/memory/ttl) of a worker by ID, or false if the worker is not in the pool. The zero profile is the default profile (empty cpu/memory).

(workerID int)

Source from the content-addressed store, hash-verified

993// (only) pid in the worker's index is authoritative. Used by the admin
994// live-query detail to address a query by worker id instead of the per-org pid.
995func (sm *SessionManager) SessionForWorker(workerID int) (*ManagedSession, bool) {
996 sm.mu.RLock()
997 defer sm.mu.RUnlock()
998 pids := sm.byWorker[workerID]
999 if len(pids) == 0 {
1000 return nil, false
1001 }
1002 s, ok := sm.sessions[pids[0]]
1003 return s, ok
1004}

Callers 1

AllWorkerStatusesMethod · 0.80

Calls 2

ProfileMethod · 0.80
WorkerMethod · 0.65

Tested by

no test coverage detected