From 578ea7aaa08378427d029ed662974b5334dda099 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Fri, 24 Oct 2025 19:23:41 +0300 Subject: [PATCH] fix 1 sec delay on start We use supervisord in an environment that requires starting processes fast and even 1 sec counts. Signed-off-by: Stepan Blyschak --- supervisor/supervisord.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/supervisor/supervisord.py b/supervisor/supervisord.py index 8d9ebe30f..8d21eca33 100755 --- a/supervisor/supervisord.py +++ b/supervisor/supervisord.py @@ -173,11 +173,17 @@ def ordered_stop_groups_phase_2(self): def runforever(self): events.notify(events.SupervisorRunningEvent()) - timeout = 1 # this cannot be fewer than the smallest TickEvent (5) + first_poll = True socket_map = self.options.get_socket_map() while 1: + if first_poll: + timeout = 0 + first_poll = False + else: + timeout = 1 # this cannot not be fewer than the smallest TickEvent (5) + combined_map = {} combined_map.update(socket_map) combined_map.update(self.get_process_map())