[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30618 - eclectic/gplmt/gplmt
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30618 - eclectic/gplmt/gplmt |
Date: |
Thu, 7 Nov 2013 20:12:34 +0100 |
Author: peterb
Date: 2013-11-07 20:12:34 +0100 (Thu, 07 Nov 2013)
New Revision: 30618
Modified:
eclectic/gplmt/gplmt/Worker.py
Log:
Fixed a bug that prevented a test run from closing properly if no timeout was
assigned
Modified: eclectic/gplmt/gplmt/Worker.py
===================================================================
--- eclectic/gplmt/gplmt/Worker.py 2013-11-07 19:07:11 UTC (rev 30617)
+++ eclectic/gplmt/gplmt/Worker.py 2013-11-07 19:12:34 UTC (rev 30618)
@@ -163,7 +163,7 @@
delta = int(min((task.stop_absolute -
datetime.datetime.now()).total_seconds(), task.stop_relative))
- if (delta > 0):
+ if (delta > 0 and delta < 31556926):
g_logger.log (self.node.hostname + " : Task will be
interrupted in " + str(delta) + " seconds")
self.timer = threading.Timer(delta, self.interrupt_task)
self.timer.start()
@@ -209,6 +209,10 @@
break
task = self.tasks.get()
+ if (self.timer != None):
+ self.timer.cancel()
+ self.timer = None
+
if (interrupt):
g_notifications.tasklist_completed (self.node, self.tasks,
Tasks.Taskresult.user_interrupt, "")
if (None != task):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30618 - eclectic/gplmt/gplmt,
gnunet <=