Skip to content

Commit

Permalink
recurent interval use total seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaChuvaev committed Feb 8, 2024
1 parent 16ec256 commit 58bf88a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sharded_queue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class RecurrentRequest(NamedTuple):
@classmethod
def get_interval(cls, interval: int | float | timedelta) -> float:
if isinstance(interval, timedelta):
return float(interval.seconds)
return float(interval.total_seconds())

return float(interval)

Expand Down

0 comments on commit 58bf88a

Please sign in to comment.