Skip to content

Commit 2d1078a

Browse files
authored
Merge pull request #1700 from stepanblyschak/1secdelay
fix 1 sec delay on start
2 parents 6411079 + 578ea7a commit 2d1078a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

supervisor/supervisord.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,17 @@ def ordered_stop_groups_phase_2(self):
173173

174174
def runforever(self):
175175
events.notify(events.SupervisorRunningEvent())
176-
timeout = 1 # this cannot be fewer than the smallest TickEvent (5)
176+
first_poll = True
177177

178178
socket_map = self.options.get_socket_map()
179179

180180
while 1:
181+
if first_poll:
182+
timeout = 0
183+
first_poll = False
184+
else:
185+
timeout = 1 # this cannot not be fewer than the smallest TickEvent (5)
186+
181187
combined_map = {}
182188
combined_map.update(socket_map)
183189
combined_map.update(self.get_process_map())

0 commit comments

Comments
 (0)