@@ -161,6 +161,7 @@ to interact and monitor the Scroll Application`,
161161 if currentScroll .CanColdStart () {
162162
163163 for {
164+ healthHandler .Started = false
164165 logger .Log ().Info ("Starting coldstarter" )
165166 finish := coldStarter .Start (ctx )
166167 executedPort := <- finish
@@ -171,7 +172,7 @@ to interact and monitor the Scroll Application`,
171172
172173 logger .Log ().Info ("Coldstarter done, starting scroll" )
173174
174- startup (scrollService , processLauncher , queueManager , portService , coldStarter , cwd , doneChan )
175+ startup (scrollService , processLauncher , queueManager , portService , coldStarter , healthHandler , cwd , doneChan )
175176
176177 portService .ResetOpenPorts ()
177178
@@ -211,10 +212,10 @@ to interact and monitor the Scroll Application`,
211212 }
212213 } else {
213214 logger .Log ().Warn ("No ports to start, skipping coldstarter" )
214- startup (scrollService , processLauncher , queueManager , portService , coldStarter , cwd , doneChan )
215+ startup (scrollService , processLauncher , queueManager , portService , coldStarter , healthHandler , cwd , doneChan )
215216 }
216217 } else {
217- startup (scrollService , processLauncher , queueManager , portService , coldStarter , cwd , doneChan )
218+ startup (scrollService , processLauncher , queueManager , portService , coldStarter , healthHandler , cwd , doneChan )
218219 }
219220
220221 }()
@@ -264,7 +265,9 @@ func init() {
264265 ServeCommand .Flags ().UintVarP (& maxStartupHealthCheckTimeout , "max-health-check-startup-timeount" , "" , 0 , "Sets the max amount of time the health check is allowed to take on startup. If the value is 0, there will be no timeout. This is useful to prevent the health check from blocking the startup of the daemon fully." )
265266}
266267
267- func startup (scrollService * services.ScrollService , processLauncher * services.ProcedureLauncher , queueManager * services.QueueManager , portSerivce * services.PortMonitor , coldStarter * services.ColdStarter , cwd string , doneChan chan error ) {
268+ func startup (scrollService * services.ScrollService , processLauncher * services.ProcedureLauncher , queueManager * services.QueueManager , portSerivce * services.PortMonitor , coldStarter * services.ColdStarter , healthHandler * handler.HealthHandler , cwd string , doneChan chan error ) {
269+
270+ healthHandler .Started = true
268271
269272 currentScroll := scrollService .GetCurrent ()
270273
0 commit comments