aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2016-05-09 11:35:11 -0400
committerTom Ritter <tom@ritter.vg>2016-05-09 11:36:03 -0400
commit72365ece894883a2dd4b2e5add38743e3a1cd509 (patch)
treeace656ba2eb93fd9e719080d35a97cbf6f3a5835
parent19db484e2b851d9a944e005e47158c4d8cd82b81 (diff)
Need to compare timedelta to timedelta
-rwxr-xr-xjobs/JobBase.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/jobs/JobBase.py b/jobs/JobBase.py
index 427dd17..09a8333 100755
--- a/jobs/JobBase.py
+++ b/jobs/JobBase.py
@@ -51,19 +51,19 @@ class JobBase(object):
elif notifyFrequency == JobFailureNotificationFrequency.EVERYFIVEMINUTES:
now = time.time()
lastNotify = jobState.LastNotifyTime
- if now - lastNotify > datetime.timedelta(minutes=4, seconds=30):
+ if datetime.timedelta(seconds=(now - lastNotify)) > datetime.timedelta(minutes=4, seconds=30):
return True
return False
elif notifyFrequency == JobFailureNotificationFrequency.EVERYTENMINUTES:
now = time.time()
lastNotify = jobState.LastNotifyTime
- if now - lastNotify > datetime.timedelta(minutes=9, seconds=15):
+ if datetime.timedelta(seconds=(now - lastNotify)) > datetime.timedelta(minutes=9, seconds=15):
return True
return False
elif notifyFrequency == JobFailureNotificationFrequency.EVERYHOUR:
now = time.time()
lastNotify = jobState.LastNotifyTime
- if now - lastNotify > datetime.timedelta(minutes=59, seconds=0):
+ if datetime.timedelta(seconds=(now - lastNotify)) > datetime.timedelta(minutes=59, seconds=0):
return True
return False
elif notifyFrequency == JobFailureNotificationFrequency.ONSTATECHANGE: