(ip_address, port)
| 78 | |
| 79 | |
| 80 | def 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() |
no test coverage detected