Browse Source

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 years ago
parent
commit
d9a4fe3fc9
1 changed files with 5 additions and 2 deletions
  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 """