unregisterHeartbeat removes a chat from the centralized heartbeat loop when chat processing finishes.
(chatID uuid.UUID)
| 4824 | // unregisterHeartbeat removes a chat from the centralized |
| 4825 | // heartbeat loop when chat processing finishes. |
| 4826 | func (p *Server) unregisterHeartbeat(chatID uuid.UUID) { |
| 4827 | p.heartbeatMu.Lock() |
| 4828 | defer p.heartbeatMu.Unlock() |
| 4829 | delete(p.heartbeatRegistry, chatID) |
| 4830 | } |
| 4831 | |
| 4832 | // heartbeatLoop runs in a single goroutine, issuing one batch |
| 4833 | // heartbeat query per interval for all registered chats. |
no test coverage detected