Commit 7fef1351 authored by Betoule Marc's avatar Betoule Marc
Browse files

Bug correction in worker: last task was reported Failed in debug mode

parent 9f1ab449
......@@ -108,16 +108,14 @@ class Worker(object):
n = 0
try:
for task in iter(self.scheduler.get_task, None):
if task is not None:
self.work_dir = self.pipe.get_curr_dir(task.seg)
task = self.execute_task(task)
if task.status == "done":
self.scheduler.task_done(task)
else:
self.scheduler.task_failed(task)
n = n+1
self.work_dir = self.pipe.get_curr_dir(task.seg)
task = self.execute_task(task)
if task.status == "done":
self.scheduler.task_done(task)
else:
break
self.scheduler.task_failed(task)
n = n+1
self.task = None
logger.info("%d jobs completed" % n)
except AbortError, e:
logger.warning( "Abort after catching signal %d" % e.signal)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment