func (s *Manager) Shutdown(code int) {
	// stop any profiling at exit
	pprof.StopCPUProfile()

	// TODO: Each part of the manager needs to gracefully stop at some point
	// for now, we just close the database.
	err := database.Close()
	if err != nil {
		logger.Errorf("Error closing database: %s", err)
		if code == 0 {
			os.Exit(1)
		}
	}

	os.Exit(code)
}
// Shutdown gracefully stops the manager
Shutdown gracefully stops the manager
// Shutdown gracefully stops the manager
func (s *Manager) Shutdown(code int) {
	pprof.StopCPUProfile()
	err := database.Close()
	if err != nil {
		logger.Errorf("Error closing database: %s", err)
		if code == 0 {
			os.Exit(1)
		}
	}
	os.Exit(code)
}
func ( s * Manager ) Shutdown ( code int ) { pprof . StopCPUProfile ( ) err := database . Close ( ) if err != nil { logger . Errorf ( " " , err ) if code == 0 { os . Exit ( 1 ) } } os . Exit ( code ) }
Shutdown gracefully stops the manager
Shutdown gracefully stops the manager
// stop any profiling at exit // TODO: Each part of the manager needs to gracefully stop at some point // for now, we just close the database.