MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / check

Method check

misc/python/materialize/teleport.py:82–91  ·  view source on GitHub ↗

Check if a Teleport proxy is already running for the specified app_name.

(cls, app_name: str)

Source from the content-addressed store, hash-verified

80
81 @classmethod
82 def check(cls, app_name: str) -> str | None:
83 """Check if a Teleport proxy is already running for the specified app_name."""
84
85 teleport_state = build_config.TeleportLocalState.read()
86 existing_pid = teleport_state.get_pid(app_name)
87
88 if existing_pid and psutil.pid_exists(int(existing_pid)):
89 return teleport_state.get_pid(app_name)
90 else:
91 return None

Callers 1

spawnMethod · 0.45

Calls 2

get_pidMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected