Skip to content

Commit

Permalink
Allow UNKNOWN statuses to retry as well; initialize rocoto_state
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Aug 13, 2024
1 parent f761b92 commit 4c529c3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ci/scripts/utils/rocotostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,16 @@ def is_stalled(rocoto_status):
elif rocoto_status['DEAD'] > 0:
error_return = rocoto_status['FAIL'] + rocoto_status['DEAD']
rocoto_state = 'FAIL'
elif 'UNKNOWN' in rocoto_status:
error_return = rocoto_status['UNKNOWN']
rocoto_state = 'UNKNOWN'
elif 'UNAVAILABLE' in rocoto_status:
elif 'UNAVAILABLE' in rocoto_status or 'UNKNOWN' in rocoto_status:
rocoto_status = attempt_multiple_times(lambda: rocoto_statcount(rocotostat), 2, 120, ProcessError)
error_return = 0
rocoto_state = 'RUNNING'
if 'UNAVAILABLE' in rocoto_status:
error_return = rocoto_status['UNAVAILABLE']
rocoto_state = 'UNAVAILABLE'
if 'UNKNOWN' in rocoto_status:
error_return += rocoto_status['UNKNOWN']
rocoto_state = 'UNKNOWN'
elif is_stalled(rocoto_status):
rocoto_status = attempt_multiple_times(lambda: rocoto_statcount(rocotostat), 2, 120, ProcessError)
if is_stalled(rocoto_status):
Expand Down

0 comments on commit 4c529c3

Please sign in to comment.