From a79ad250019691ba8a81fdf07b14922587cf1cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Aramis=20Aguilar=20Rodr=C3=ADguez?= Date: Thu, 1 Nov 2018 15:04:22 -0600 Subject: [PATCH] redis_scheduler failing redis_scheduler failed when calculating next_run_time (method total_seconds() belongs to timedelta) --- gluon/contrib/redis_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/contrib/redis_scheduler.py b/gluon/contrib/redis_scheduler.py index 6a3f00fc..bc39201d 100644 --- a/gluon/contrib/redis_scheduler.py +++ b/gluon/contrib/redis_scheduler.py @@ -487,7 +487,7 @@ class RScheduler(Scheduler): # calc next_run_time based on available slots # see #1191 next_run_time = task.start_time - secondspassed = self.total_seconds(now - next_run_time) + secondspassed = (now - next_run_time).total_seconds() steps = secondspassed // task.period + 1 next_run_time += datetime.timedelta(seconds=task.period * steps)