MCPcopy Create free account
hub / github.com/Freedium-cfd/web / server_cmd

Function server_cmd

web/server/services/cli.py:20–32  ·  view source on GitHub ↗
(cmd: ArgumentParser, opts: Namespace)

Source from the content-addressed store, hash-verified

18
19
20def server_cmd(cmd: ArgumentParser, opts: Namespace):
21 from server.utils.utils import is_port_in_use
22
23 if is_port_in_use(opts.port):
24 cmd.error(f"Port {opts.port} is in use or permission denied")
25
26 # from server.services.worker import execute_server_worker
27 from server.services.uvicorn import execute_server
28
29 # from server.utils.maintenance_scheduler import do_maintenance
30 # threading.Thread(target=do_maintenance, daemon=True).start()
31 # execute_server_worker(host="0.0.0.0", port=opts.port)
32 execute_server(host="0.0.0.0", port=opts.port)

Callers 1

cliFunction · 0.85

Calls 3

is_port_in_useFunction · 0.90
execute_serverFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected