fix sched to wait for the runner to terminate to ensure following vram check will be more accurate

This commit is contained in:
Mark Ward 2024-04-28 16:41:38 +00:00
parent a3e60d9058
commit 948114e3e3

View file

@ -899,7 +899,10 @@ func (s *llmServer) Detokenize(ctx context.Context, tokens []int) (string, error
func (s *llmServer) Close() error { func (s *llmServer) Close() error {
if s.cmd != nil { if s.cmd != nil {
slog.Debug("stopping llama server") slog.Debug("stopping llama server")
return s.cmd.Process.Kill() if err := s.cmd.Process.Kill(); err != nil {
return err
}
return s.cmd.Wait()
} }
return nil return nil