MCPcopy
hub / github.com/PaddlePaddle/PARL / check_log_server_started

Function check_log_server_started

parl/remote/scripts.py:80–96  ·  view source on GitHub ↗
(ip_address, port)

Source from the content-addressed store, hash-verified

78
79
80def check_log_server_started(ip_address, port):
81 started = False
82 for i in range(10):
83 try:
84 r = requests.get("http://{}:{}/get-log".format(ip_address, port))
85 if r.status_code == 400:
86 started = True
87 break
88 except:
89 pass
90 time.sleep(3)
91 click.echo("[{}/10] Checking status of log_server...".format(i))
92
93 if started:
94 click.echo("# Start the log server sucessfully.")
95 else:
96 click.echo("# Fail to start the log server.")
97
98
99@click.group()

Callers 2

start_masterFunction · 0.85
start_workerFunction · 0.85

Calls 2

formatMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected