summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmer Katz <omer.drow@gmail.com>2021-04-07 12:40:30 +0300
committerOmer Katz <omer.drow@gmail.com>2021-04-07 12:41:50 +0300
commit5aab4f60a71c8257a84a5088bcd520c924946eb2 (patch)
tree612c54de0e6504b7161a1150627f9200ea9c923f
parent7c34684ae831bb89c7b5c83c888b0a9a8c62a5a2 (diff)
downloadkombu-timer-secs-coerce-to-float.tar.gz
Coerce seconds argument to a floating point number.timer-secs-coerce-to-float
Celery does not coerce configuration values into the right type (See celery/celery#6696). This is a workaround. This bug will be fixed in Celery NextGen when we will refactor our configuration subsystem.
-rw-r--r--kombu/asynchronous/timer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kombu/asynchronous/timer.py b/kombu/asynchronous/timer.py
index 81a204bb..70951f11 100644
--- a/kombu/asynchronous/timer.py
+++ b/kombu/asynchronous/timer.py
@@ -155,7 +155,7 @@ class Timer:
return self._enter(eta, priority, entry)
def enter_after(self, secs, entry, priority=0, time=monotonic):
- return self.enter_at(entry, time() + secs, priority)
+ return self.enter_at(entry, time() + float(secs), priority)
def _enter(self, eta, priority, entry, push=heapq.heappush):
push(self._queue, scheduled(eta, priority, entry))