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

Method GetProgress

controlplane/session_mgr.go:1004–1016  ·  view source on GitHub ↗

GetProgress returns the cached query progress for a session, or nil.

(pid int32)

Source from the content-addressed store, hash-verified

1002 s, ok := sm.sessions[pids[0]]
1003 return s, ok
1004}
1005
1006// ProtocolForPID returns the session interface ("postgres"/"admin"),
1007// or "" if not found. O(1) lookup for the admin live-query detail view.
1008func (sm *SessionManager) ProtocolForPID(pid int32) string {
1009 sm.mu.RLock()
1010 defer sm.mu.RUnlock()
1011 if s, ok := sm.sessions[pid]; ok {
1012 return s.Protocol
1013 }
1014 return ""
1015}
1016
1017// WorkerPodNameForPID returns the K8s pod name of the worker hosting the
1018// session, or "" if not found or not running on K8s.
1019func (sm *SessionManager) WorkerPodNameForPID(pid int32) string {

Callers 3

RunControlPlaneFunction · 0.95
RunningQueriesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected