Skip to content

Commit

Permalink
[RHCLOUD-18586] Added minimum duration of 30 mins. (#200)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Knop <[email protected]>
  • Loading branch information
maknop and Matthew Knop authored Mar 25, 2022
1 parent 5a5da06 commit abd1e56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bonfire/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def validate_time_string(time):
seconds = hms_to_seconds(time)
if seconds > 1209600: # 14 days
raise ValueError(f"invalid duration '{time}', must be less than 14 days")
elif seconds < 1800: # 30 mins
raise ValueError(f"invalid duration '{time}', must be more than 30 mins")
return time


Expand Down

0 comments on commit abd1e56

Please sign in to comment.