[tor-commits] [ooni-probe/master] Reschedule failures immediately
art at torproject.org
art at torproject.org
Tue Aug 27 10:03:52 UTC 2013
commit c3cc01f9a35943d2c864632f3fb0d280d1c5e96a
Author: aagbsn <aagbsn at extc.org>
Date: Sun Aug 25 14:50:41 2013 +0200
Reschedule failures immediately
Reschedule failures immediately so they do not accrue at the end
of the task list and eat memory.
---
ooni/managers.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ooni/managers.py b/ooni/managers.py
index cc2d067..36b791e 100644
--- a/ooni/managers.py
+++ b/ooni/managers.py
@@ -37,8 +37,8 @@ class TaskManager(object):
if task.failures <= self.retries:
log.debug("Rescheduling...")
- self._tasks = itertools.chain(self._tasks,
- makeIterable(task))
+ self._tasks = itertools.chain(makeIterable(task), self._tasks)
+
else:
# This fires the errback when the task is done but has failed.
log.err('Permanent failure for %s' % task)
More information about the tor-commits
mailing list