From 58bf88a1bef47b44a020f86e298d97be81a565d8 Mon Sep 17 00:00:00 2001 From: Ilya Chuvaev Date: Thu, 8 Feb 2024 14:08:40 +0300 Subject: [PATCH] recurent interval use total seconds --- sharded_queue/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharded_queue/__init__.py b/sharded_queue/__init__.py index 634a51a..2a45f34 100644 --- a/sharded_queue/__init__.py +++ b/sharded_queue/__init__.py @@ -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)