File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11default_server  = " localhost" 
2- spacetimedb_token  = " eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJoZXhfaWRlbnRpdHkiOiJjMjAwMTU3NGEwMjgyNDRjNzZhNTE1MjU1NGMzY2ZjMWJiNmIzNzZlNjY4YmU1Yjg2MzE0MDAyYWRmOTMyYWVlIiwic3ViIjoiYzYwOWJkYjUtMDAyNS00YzZkLWIyZTktOGYyODEwM2IzNWUzIiwiaXNzIjoibG9jYWxob3N0IiwiYXVkIjpbInNwYWNldGltZWRiIl0sImlhdCI6MTc1NjkwOTQ3NywiZXhwIjpudWxsfQ.t6Aobx9fTe6kwvq7H01-2RO7vdK4SjQB7Uw-Lh4Daz0lG43WzIw3oVG_65txqlsFSkpx40wYElByj4jMolutpA " 
2+ spacetimedb_token  = " eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJoZXhfaWRlbnRpdHkiOiJjMjAwMTI5ZmQyYjgyY2M5OTRhYmYyYTNmZDI0NzBkN2ZmNWVkMmEzOWE2MzUzZjg3YTU0NGVjYWZjMWMwMTNiIiwic3ViIjoiYzc0YmYzZDUtYTI4MS00ZjAwLTgwY2ItYjI0ZGI2MDczOTg4IiwiaXNzIjoibG9jYWxob3N0IiwiYXVkIjpbInNwYWNldGltZWRiIl0sImlhdCI6MTc2MTc1NzQ5NiwiZXhwIjpudWxsfQ.muAnR3MDXNgXSZSFvbKH7l9AmUy8ybg2lrSwHA5JQ-BhuMan5fGkDIeh1-RmeKJy0b_32n8pvGUmE1uTJfxyqA " 
33
44[[server_configs ]]
55nickname  = " localhost" 
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 ):
3236            # sleep a bit more to allow for leader election etc 
3337            # TODO: make ping endpoint consider all server state 
34-             time .sleep (2 )
38+             time .sleep (15 )
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 }  
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments