UpdateProgress caches query progress data for sessions on the given worker. Called from the health check loop after parsing the worker's health check response. Progress keys are truncated session tokens (first 16 chars) to avoid leaking full bearer tokens in health check JSON.
(workerID int, progress map[string]*SessionProgress)
| 1020 | sm.mu.RLock() |
| 1021 | s, ok := sm.sessions[pid] |
| 1022 | sm.mu.RUnlock() |
| 1023 | if !ok { |
| 1024 | return "" |
| 1025 | } |
| 1026 | worker, ok := sm.pool.Worker(s.WorkerID) |
| 1027 | if !ok || worker == nil { |
| 1028 | return "" |
| 1029 | } |
| 1030 | return worker.PodName() |
| 1031 | } |
| 1032 | |
| 1033 | // WorkerProfile returns the pod-shape profile (cpu/memory/ttl) of a worker by |
| 1034 | // ID, or false if the worker is not in the pool. The zero profile is the |
| 1035 | // default profile (empty cpu/memory). |
| 1036 | func (sm *SessionManager) WorkerProfile(workerID int) (WorkerProfile, bool) { |
| 1037 | w, ok := sm.pool.Worker(workerID) |
| 1038 | if !ok || w == nil { |
| 1039 | return WorkerProfile{}, false |
| 1040 | } |
| 1041 | return w.Profile(), true |
no outgoing calls
no test coverage detected