File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,21 @@ def restart_docker():
2626
2727 # Ensure all nodes are running.
2828 attempts = 0
29- while attempts < 5 :
29+ while attempts < 10 :
3030 attempts += 1
31- if all (container .is_running (docker , spacetimedb_ping_url ) for container in containers ):
31+ containers_alive = {
32+ container .name : container .is_running (docker , spacetimedb_ping_url )
33+ for container in containers
34+ }
35+ if all (containers_alive .values ()):
3236 # sleep a bit more to allow for leader election etc
3337 # TODO: make ping endpoint consider all server state
3438 time .sleep (2 )
3539 return
3640 else :
3741 time .sleep (1 )
3842
39- raise Exception ("Not all containers are up and running" )
43+ raise Exception (f "Not all containers are up and running: { containers_alive !r } " )
4044
4145def spacetimedb_ping_url (port : int ) -> str :
4246 return f"http://127.0.0.1:{ port } /v1/ping"
You can’t perform that action at this time.
0 commit comments