You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self.logger_info(f"Polling engine status until {desired_status}...")
447
449
last_report_time=time.time()
448
450
init_poll_time=last_report_time
451
+
initial_status, _=self.get_engine_status()
449
452
450
453
whileTrue:
451
454
try:
452
455
current_status, _=self.get_engine_status()
453
456
current_time=time.time()
454
457
458
+
# Check if timeout has been reached
459
+
ifcurrent_time-init_poll_time>=timeout:
460
+
raiseTimeoutError(f"Timeout reached while waiting for engine status to change to {desired_status}")
461
+
462
+
if (initial_status=="ENGINE.OFFLINE") and (current_status=="ENGINE.OFFLINE"):
463
+
raiseSwarmServerOfflineError(f"Engine status changed from {initial_status} to OFFLINE while waiting for {desired_status}. This may indicate an error in the engine. Please check the swarm server logs for details.")
0 commit comments