MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / stop

Method stop

tools/server/tests/utils.py:295–314  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

293 raise TimeoutError(f"Server did not start within {timeout_seconds} seconds")
294
295 def stop(self) -> None:
296 if self.external_server:
297 print("[external_server]: Not stopping external server")
298 return
299 if self in server_instances:
300 server_instances.remove(self)
301 if self.process:
302 print(f"Stopping server with pid={self.process.pid}")
303 self.process.terminate()
304 try:
305 self.process.wait(timeout=5)
306 except subprocess.TimeoutExpired:
307 print(f"Server pid={self.process.pid} did not terminate in time, killing")
308 self.process.kill()
309 self.process.wait(timeout=5)
310 except Exception as e:
311 print(f"Error waiting for server: {e}")
312 self.process = None
313 if hasattr(self, '_log') and self._log != sys.stdout:
314 self._log.close()
315
316 def make_request(
317 self,

Callers 9

load_allMethod · 0.45
test_server_slotsFunction · 0.45
test_no_webuiFunction · 0.45
stopRecordingMethod · 0.45
cancelRecordingMethod · 0.45
cleanupMethod · 0.45

Calls 2

terminateMethod · 0.45
closeMethod · 0.45

Tested by 5

test_server_slotsFunction · 0.36
test_no_webuiFunction · 0.36