From d2c9f510bc85e5a86354abfec19e24f2d18f1529 Mon Sep 17 00:00:00 2001 From: niphlod Date: Sun, 15 Jun 2014 17:35:42 +0200 Subject: [PATCH] if a worker is DISABLED while processing a task, it shouldn't resume after finishing it --- gluon/scheduler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gluon/scheduler.py b/gluon/scheduler.py index d18f955f..909ed715 100644 --- a/gluon/scheduler.py +++ b/gluon/scheduler.py @@ -657,7 +657,8 @@ class Scheduler(MetaScheduler): self.w_stats.status = RUNNING self.w_stats.total += 1 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: self.w_stats.empty_runs += 1 logger.debug('sleeping...')