catch timeout in es connection check

This commit is contained in:
Simon 2023-07-31 09:08:54 +07:00
parent 06f3055913
commit befdc64772
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -81,7 +81,10 @@ class Command(BaseCommand):
_, status_code = ElasticWrap("/").get(
timeout=1, print_error=False
)
except requests.exceptions.ConnectionError:
except (
requests.exceptions.ConnectionError,
requests.exceptions.Timeout,
):
sleep(5)
continue