浏览代码

Make sure processes in the fatal state get their delay cleared (supervisord was sticking in the delayprocs state after a reload with a bunch of processes in FATAL).

Chris McDonough 19 年之前
父节点
当前提交
d9a4fe3fc9
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/supervisor/supervisord.py

+ 5 - 2
src/supervisor/supervisord.py

@@ -581,14 +581,17 @@ class Supervisor:
         now = time.time()
         processes = self.processes.values()
         for proc in processes:
-            if proc.get_state() == ProcessStates.BACKOFF:
+            state = proc.get_state()
+            if state == ProcessStates.BACKOFF:
                 if proc.backoff > proc.config.startretries:
                     proc.backoff = 0
                     proc.delay = 0
                     proc.system_stop = 1
-            elif proc.get_state() == ProcessStates.RUNNING:
+            elif state == ProcessStates.RUNNING:
                 if proc.delay < now:
                     proc.delay = 0
+            elif state == ProcessStates.FATAL:
+                proc.delay = 0
 
     def get_delay_processes(self):
         """ Processes which are starting or stopping """