Преглед изворни кода

Fix timedelta check in cron module

Daniel Vincze пре 5 година
родитељ
комит
6348218d54
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      coriolis/cron/cron.py

+ 1 - 1
coriolis/cron/cron.py

@@ -105,7 +105,7 @@ class CronJob(object):
             LOG.debug('Job %s is not enabled', self.name)
             return False
         if self._last_run:
-            if (dt - self._last_run).seconds < 60:
+            if (dt - self._last_run).total_seconds() < 60:
                 LOG.debug('Job %s has last run in less than a minute ago. '
                           'Skipping.', self.name)
                 return False