Close database connections last on shutdown (#11683)

The job workers and cluster discovery components require access to the
database during shutdown. To avoid issues, we leave the database open
until the last step of the shutdown process.
Этот коммит содержится в:
Eli Young
2019-07-23 00:41:11 -07:00
коммит произвёл George Goldberg
родитель fe8a0f6485
Коммит f4ef9cab5b

Просмотреть файл

@@ -332,10 +332,6 @@ func (s *Server) Shutdown() error {
s.StopHTTPServer()
s.WaitForGoroutines()
if s.Store != nil {
s.Store.Close()
}
if s.htmlTemplateWatcher != nil {
s.htmlTemplateWatcher.Close()
}
@@ -358,6 +354,10 @@ func (s *Server) Shutdown() error {
s.Jobs.StopSchedulers()
}
if s.Store != nil {
s.Store.Close()
}
mlog.Info("Server stopped")
return nil
}