Prechádzať zdrojové kódy

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

Mark Ward 1 rok pred
rodič
commit
948114e3e3
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      llm/server.go

+ 4 - 1
llm/server.go

@@ -899,7 +899,10 @@ func (s *llmServer) Detokenize(ctx context.Context, tokens []int) (string, error
 func (s *llmServer) Close() error {
 	if s.cmd != nil {
 		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