Skip to content

Commit

Permalink
handle waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
elewis2 committed Jul 9, 2024
1 parent ef0ca7b commit fefd253
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pori_python/ipr/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
)
Expand Down

0 comments on commit fefd253

Please sign in to comment.