MCPcopy Create free account
hub / github.com/agentcodee/cursor-free-everyday / check_server_health

Function check_server_health

example.py:59–70  ·  view source on GitHub ↗
(server_url)

Source from the content-addressed store, hash-verified

57 return None
58
59def check_server_health(server_url):
60 try:
61 response = requests.get(f"{server_url}/health", timeout=5)
62 if response.status_code == 200:
63 data = response.json()
64 return True
65 else:
66 print(f"失败,状态码: {response.status_code}")
67 return False
68 except Exception as e:
69 print(f"出错: {e}")
70 return False
71
72def main():
73 """主函数"""

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected