(sessionID, profile string)
| 322 | } |
| 323 | |
| 324 | func (s Service) SetSessionCPUProfile(sessionID, profile string) error { |
| 325 | var containerID, runID string |
| 326 | if err := s.DB.QueryRow(`SELECT COALESCE(container_id, ''), run_id FROM sessions WHERE id = ?`, sessionID).Scan(&containerID, &runID); err != nil { |
| 327 | return err |
| 328 | } |
| 329 | if containerID == "" { |
| 330 | return fmt.Errorf("session %s has no container id", sessionID) |
| 331 | } |
| 332 | return s.setContainerCPUProfile(runID, sessionID, containerID, profile) |
| 333 | } |
| 334 | |
| 335 | func (s Service) Interrupt(processID string) error { |
| 336 | var containerID string |
no test coverage detected