Retry marshaller activation on timeout
This commit is contained in:
		
							parent
							
								
									8dede76f87
								
							
						
					
					
						commit
						d0e1c53fde
					
				| @ -78,8 +78,14 @@ def is_east_door_currently_open(): | |||||||
| 
 | 
 | ||||||
| def activate_marshaller(): | def activate_marshaller(): | ||||||
|     print('activating marshaller', flush=True) |     print('activating marshaller', flush=True) | ||||||
|  | 
 | ||||||
|  |     for _ in range(2): | ||||||
|  |         try: | ||||||
|             requests.get(marshaller_uri, timeout=1) |             requests.get(marshaller_uri, timeout=1) | ||||||
|     requests.get(marshaller_uri, timeout=1) |         except requests.exceptions.ReadTimeout: | ||||||
|  |             print('read timeout - retrying marshaller', flush=True) | ||||||
|  |             sleep(2) | ||||||
|  | 
 | ||||||
|     requests.get(marshaller_uri, timeout=1) |     requests.get(marshaller_uri, timeout=1) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user