Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix base case incorrect return type for read_interval_seconds #85

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Loading