Handle future scenarios where we forgot to add a listener

This commit is contained in:
Dane Everitt 2022-01-30 11:58:53 -05:00
parent 57daf0889a
commit 0ec0fffa4d

View File

@ -98,8 +98,9 @@ func (s *Server) processConsoleOutputEvent(v []byte) {
} }
} }
// StartEventListeners adds all the internal event listeners we want to use for a server. These listeners can only be // StartEventListeners adds all the internal event listeners we want to use for
// removed by deleting the server as they should last for the duration of the process' lifetime. // a server. These listeners can only be removed by deleting the server as they
// should last for the duration of the process' lifetime.
func (s *Server) StartEventListeners() { func (s *Server) StartEventListeners() {
state := make(chan events.Event) state := make(chan events.Event)
stats := make(chan events.Event) stats := make(chan events.Event)
@ -139,8 +140,10 @@ func (s *Server) StartEventListeners() {
s.Events().Publish(InstallOutputEvent, e.Data) s.Events().Publish(InstallOutputEvent, e.Data)
case environment.DockerImagePullStarted: case environment.DockerImagePullStarted:
s.PublishConsoleOutputFromDaemon("Pulling Docker container image, this could take a few minutes to complete...") s.PublishConsoleOutputFromDaemon("Pulling Docker container image, this could take a few minutes to complete...")
default: case environment.DockerImagePullCompleted:
s.PublishConsoleOutputFromDaemon("Finished pulling Docker container image") s.PublishConsoleOutputFromDaemon("Finished pulling Docker container image")
default:
s.Log().WithField("topic", e.Topic).Error("unhandled docker event topic")
} }
}() }()
} }