handle 401 ES connection status code

This commit is contained in:
Simon 2025-05-13 07:13:21 +07:00
parent 56f5c6bc4b
commit 0db4ae3c19
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ class Command(BaseCommand):
sleep(5)
continue
if status_code and status_code == 401:
sleep(5)
continue
if status_code and status_code == 200:
path = "_cluster/health?wait_for_status=yellow&timeout=60s"
_, _ = ElasticWrap(path).get(timeout=60)