check multiple time change to draft

This commit is contained in:
Jordan Blasenhauer 2024-04-19 10:48:38 +02:00
parent f1cb9ec03d
commit 66275a6e78

View file

@ -390,11 +390,17 @@ try:
log_info("Service app2.example.com has been set as draft, making sure it's not working anymore ...")
for _ in range(5):
retry = 0
for x in range(5):
retry += 1
with suppress(RequestException):
if get("http://app2.example.com").status_code < 400:
if get("http://app2.example.com").status_code < 400 and retry >= 5:
log_error("The service is still working, exiting ...")
exit(1)
if get("http://app2.example.com").status_code < 400 and retry < 5:
log_error("The service is still working, retry in 5 seconds ...")
sleep(5)
log_info("Create another service app3.example.com to get filters (need at least 4 services on page)")