We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f89e3c6 commit 072b427Copy full SHA for 072b427
container/start-save-and-restore.sh
100644
100755
@@ -2,6 +2,7 @@ set -x
2
3
python create_env_file.py
4
sudo docker compose -f save-and-restore.yml up -d
5
+python wait_for_startup.py
6
7
# Wait until the service is started.
-sleep 30
8
+#sleep 30
container/wait_for_startup.py
@@ -0,0 +1,18 @@
1
+import time
+
+import httpx
+t_wait = 30
+BASE_URL = "http://localhost:8080/save-restore"
+root_node_uid = "44bef5de-e8e6-4014-af37-b8f6c8a939a2"
9
+if __name__ == "__main__":
10
+ t_start = time.time()
11
+ while time.time() - t_start < t_wait:
12
+ client = httpx.Client(base_url=BASE_URL, timeout=1)
13
+ url = f"/node/{root_node_uid}"
14
+ response = client.request("GET", url)
15
+ if response.status_code == 200:
16
+ exit(0)
17
18
+ exit(1)
0 commit comments