Merge pull request #1157 from niphlod/fix/scheduler_stopped
fix for STOPPED tasks via stop_task()
This commit is contained in:
commit
26dab37d9f
1 file changed
+1
-3
+1
-3
@@ -391,7 +391,6 @@ class MetaScheduler(threading.Thread):
|
|||||||
except:
|
except:
|
||||||
p.terminate()
|
p.terminate()
|
||||||
p.join()
|
p.join()
|
||||||
self.have_heartbeat = False
|
|
||||||
logger.debug(' task stopped by general exception')
|
logger.debug(' task stopped by general exception')
|
||||||
tr = TaskReport(STOPPED)
|
tr = TaskReport(STOPPED)
|
||||||
else:
|
else:
|
||||||
@@ -406,7 +405,6 @@ class MetaScheduler(threading.Thread):
|
|||||||
except Queue.Empty:
|
except Queue.Empty:
|
||||||
tr = TaskReport(TIMEOUT)
|
tr = TaskReport(TIMEOUT)
|
||||||
elif queue.empty():
|
elif queue.empty():
|
||||||
self.have_heartbeat = False
|
|
||||||
logger.debug(' task stopped')
|
logger.debug(' task stopped')
|
||||||
tr = TaskReport(STOPPED)
|
tr = TaskReport(STOPPED)
|
||||||
else:
|
else:
|
||||||
@@ -922,7 +920,7 @@ class Scheduler(MetaScheduler):
|
|||||||
else:
|
else:
|
||||||
st_mapping = {'FAILED': 'FAILED',
|
st_mapping = {'FAILED': 'FAILED',
|
||||||
'TIMEOUT': 'TIMEOUT',
|
'TIMEOUT': 'TIMEOUT',
|
||||||
'STOPPED': 'QUEUED'}[task_report.status]
|
'STOPPED': 'FAILED'}[task_report.status]
|
||||||
status = (task.retry_failed
|
status = (task.retry_failed
|
||||||
and task.times_failed < task.retry_failed
|
and task.times_failed < task.retry_failed
|
||||||
and QUEUED or task.retry_failed == -1
|
and QUEUED or task.retry_failed == -1
|
||||||
|
|||||||
Reference in new issue
Block a user