MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / shutdown

Function shutdown

main.py:88–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87
88def shutdown():
89 # Stop system monitor
90 try:
91 get_monitor().stop()
92 except Exception:
93 pass
94 # If daemon is running, leave llama-server alive for it
95 if _daemon_is_running():
96 return
97 # Unload model and kill llama-server on port 8080
98 try:
99 from core.loader_v2 import get_loader
100 get_loader().unload()
101 except Exception:
102 pass
103 # SIGKILL any remaining llama-server
104 try:
105 import subprocess
106 subprocess.run(["pkill", "-9", "-f", "llama-server"], capture_output=True, timeout=5)
107 except Exception:
108 pass
109
110def run_init():
111 from core.project import detect_project

Callers 3

handle_commandFunction · 0.85
replFunction · 0.85
mainFunction · 0.85

Calls 6

get_monitorFunction · 0.90
get_loaderFunction · 0.90
_daemon_is_runningFunction · 0.85
unloadMethod · 0.80
runMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected