From befdc64772e30186a5cb150da0ee50df1cbe04c5 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 31 Jul 2023 09:08:54 +0700 Subject: [PATCH] catch timeout in es connection check --- tubearchivist/config/management/commands/ta_connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tubearchivist/config/management/commands/ta_connection.py b/tubearchivist/config/management/commands/ta_connection.py index 86a3bd3..f7a51d2 100644 --- a/tubearchivist/config/management/commands/ta_connection.py +++ b/tubearchivist/config/management/commands/ta_connection.py @@ -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