Author: tmckay
Date: 2013-03-08 19:47:59 +0000 (Fri, 08 Mar 2013)
New Revision: 5735
Modified:
trunk/mint/python/mint/aviary/work.py
Log:
Fix time calculation error in WaitList
Modified: trunk/mint/python/mint/aviary/work.py
===================================================================
--- trunk/mint/python/mint/aviary/work.py 2013-03-07 20:11:17 UTC (rev 5734)
+++ trunk/mint/python/mint/aviary/work.py 2013-03-08 19:47:59 UTC (rev 5735)
@@ -137,7 +137,7 @@
# for the first item on the list
if self.waiting:
d = self.waiting[0][0] - datetime.now()
- s = d.days * 86400 + d.seconds
+ s = d.days * 86400.0 + d.microseconds / 1000000.0 + d.seconds
else:
s = None
if s is None or s > 0:
@@ -149,7 +149,7 @@
# See if something finished...
if self.waiting and \
- datetime.now() > self.waiting[0][0]:
+ datetime.now() >= self.waiting[0][0]:
work = self.waiting.pop(0)[1]
self.ready_queue.put(work)
work = None
Show replies by date