MCPcopy Index your code
hub / github.com/HKUDS/DeepCode / cleanup_ports

Function cleanup_ports

deepcode.py:172–178  ·  view source on GitHub ↗

Clean up ports 8000 and 5173 if in use

()

Source from the content-addressed store, hash-verified

170
171
172def cleanup_ports():
173 """Clean up ports 8000 and 5173 if in use"""
174 for port in [8000, 5173]:
175 if is_port_in_use(port):
176 print(f"⚠️ Port {port} is in use, cleaning up...")
177 kill_process_on_port(port)
178 time.sleep(1)
179
180
181def install_backend_deps():

Callers 1

mainFunction · 0.85

Calls 2

is_port_in_useFunction · 0.85
kill_process_on_portFunction · 0.85

Tested by

no test coverage detected