Skip to content

Commit

Permalink
Fix base case incorrect return type for read_interval_seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
KaidanFullerton authored and jolynch committed Jan 24, 2024
1 parent 8fb9bb3 commit 6dcf066
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -144,11 +144,11 @@ def __get_slice_interval(retention: str) -> timedelta:
return DURATION_1Y

@staticmethod
def __get_read_interval_seconds(extra_model_arguments: Dict[str, Any]):
def __get_read_interval_seconds(extra_model_arguments: Dict[str, Any]) -> int:
# default read duration of 1D
read_interval = extra_model_arguments.get("ts.read-interval", "PT24H")
if read_interval == "unlimited":
return DURATION_1Y * 100
return int(DURATION_1Y.total_seconds() * 100)
return iso_to_seconds(read_interval)

@staticmethod
Expand Down

0 comments on commit 6dcf066

Please sign in to comment.