mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-08 16:19:36 +00:00
fix startup race condition cluster health
This commit is contained in:
@@ -86,6 +86,8 @@ class Command(BaseCommand):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if status_code and status_code == 200:
|
if status_code and status_code == 200:
|
||||||
|
path = "_cluster/health?wait_for_status=yellow&timeout=30s"
|
||||||
|
_, _ = ElasticWrap(path).get()
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
self.style.SUCCESS(" ✓ ES connection established")
|
self.style.SUCCESS(" ✓ ES connection established")
|
||||||
)
|
)
|
||||||
@@ -116,7 +118,7 @@ class Command(BaseCommand):
|
|||||||
return
|
return
|
||||||
|
|
||||||
message = (
|
message = (
|
||||||
" 🗙 ES connection failed. "
|
" 🗙 ES version check failed. "
|
||||||
+ f"Expected {self.MIN_MAJOR}.{self.MIN_MINOR} but got {version}"
|
+ f"Expected {self.MIN_MAJOR}.{self.MIN_MINOR} but got {version}"
|
||||||
)
|
)
|
||||||
self.stdout.write(self.style.ERROR(f"{message}"))
|
self.stdout.write(self.style.ERROR(f"{message}"))
|
||||||
|
|||||||
Reference in New Issue
Block a user