Merge pull request #462 from niphlod/fix/scheduler_disabled

a DISABLED worker shouldn't resume after completing a task
This commit is contained in:
mdipierro committed 2014-06-15 22:20:17 -05:00
commit 21bdf114b4
1 file changed
+2 -1
+2 -1
View File
@@ -657,7 +657,8 @@ class Scheduler(MetaScheduler):
self.w_stats.status = RUNNING self.w_stats.status = RUNNING
self.w_stats.total += 1 self.w_stats.total += 1
self.wrapped_report_task(task, self.async(task)) self.wrapped_report_task(task, self.async(task))
self.w_stats.status = ACTIVE if not self.w_stats.status == DISABLED:
self.w_stats.status = ACTIVE
else: else:
self.w_stats.empty_runs += 1 self.w_stats.empty_runs += 1
logger.debug('sleeping...') logger.debug('sleeping...')