From fefd2535fd66df67c6120ed61b7f4b67297e9241 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Mon, 8 Jul 2024 17:02:33 -0700 Subject: [PATCH] handle waiting --- pori_python/ipr/connection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pori_python/ipr/connection.py b/pori_python/ipr/connection.py index 4c9c597..3d83554 100644 --- a/pori_python/ipr/connection.py +++ b/pori_python/ipr/connection.py @@ -93,11 +93,11 @@ def check_status(interval: int = 5, num_attempts: int = 5): return current_status current_status = check_status() - if current_status['state'] == 'active': + if current_status['state'] in ['active', 'waiting']: current_status = check_status(interval=30) - if current_status['state'] == 'active': + if current_status['state'] == ['active', 'waiting']: current_status = check_status(interval=60, num_attempts=mins_to_wait) - if current_status['state'] == 'active': + if current_status['state'] == ['active', 'waiting']: raise Exception( f'async report upload taking longer than expected: {current_status}' )