fix for STOPPED tasks via stop_task()
they previously killed the main process
This commit is contained in:
+1
-3
@@ -391,7 +391,6 @@ class MetaScheduler(threading.Thread):
|
||||
except:
|
||||
p.terminate()
|
||||
p.join()
|
||||
self.have_heartbeat = False
|
||||
logger.debug(' task stopped by general exception')
|
||||
tr = TaskReport(STOPPED)
|
||||
else:
|
||||
@@ -406,7 +405,6 @@ class MetaScheduler(threading.Thread):
|
||||
except Queue.Empty:
|
||||
tr = TaskReport(TIMEOUT)
|
||||
elif queue.empty():
|
||||
self.have_heartbeat = False
|
||||
logger.debug(' task stopped')
|
||||
tr = TaskReport(STOPPED)
|
||||
else:
|
||||
@@ -922,7 +920,7 @@ class Scheduler(MetaScheduler):
|
||||
else:
|
||||
st_mapping = {'FAILED': 'FAILED',
|
||||
'TIMEOUT': 'TIMEOUT',
|
||||
'STOPPED': 'QUEUED'}[task_report.status]
|
||||
'STOPPED': 'FAILED'}[task_report.status]
|
||||
status = (task.retry_failed
|
||||
and task.times_failed < task.retry_failed
|
||||
and QUEUED or task.retry_failed == -1
|
||||
|
||||
Reference in New Issue
Block a user