|
@@ -26,7 +26,8 @@ def server_health_check(client, instance_id):
|
|
|
"""
|
|
|
global health_instances
|
|
|
ip_address = utils.get_ip_address(client=client, instance_id=instance_id)
|
|
|
- while True:
|
|
|
+ i = 0
|
|
|
+ while i < 7:
|
|
|
health_check_url = f"http://{ip_address}:8080/longvideoapi/test"
|
|
|
try:
|
|
|
http_code = requests.get(health_check_url).status_code
|
|
@@ -39,6 +40,7 @@ def server_health_check(client, instance_id):
|
|
|
break
|
|
|
else:
|
|
|
time.sleep(10)
|
|
|
+ i += 1
|
|
|
|
|
|
|
|
|
def restart(slb_client, instance_id, image_name):
|