Skip to content

Commit

Permalink
Merge pull request #2 from basis-company/total-seconds-interval
Browse files Browse the repository at this point in the history
recurent interval use total seconds
  • Loading branch information
IlyaChuvaev committed Feb 8, 2024
2 parents 16ec256 + 58bf88a commit e6705fb
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 e6705fb

Please sign in to comment.