MCPcopy Create free account
hub / github.com/ComfyWorkflows/ComfyUI-Launcher / get_project_port

Function get_project_port

server/utils.py:473–478  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

471 )
472
473def get_project_port(id):
474 project_path = os.path.join(PROJECTS_DIR, id)
475 if os.path.exists(os.path.join(project_path, "port.txt")):
476 with open(os.path.join(project_path, "port.txt"), "r") as f:
477 return int(f.read().strip())
478 return find_free_port(PROJECT_MIN_PORT, PROJECT_MAX_PORT)
479
480def is_port_in_use(port: int) -> bool:
481 import socket

Callers 3

list_projectsFunction · 0.90
get_projectFunction · 0.90
start_projectFunction · 0.90

Calls 1

find_free_portFunction · 0.85

Tested by

no test coverage detected