Verbose shutdown

This commit is contained in:
2014-07-12 17:58:56 +07:00
parent 313677aa48
commit da544b85b5
+9 -4
View File
@@ -15,19 +15,24 @@ func HandleShutdown() {
go func() { go func() {
<-ch <-ch
SaveState() SaveState()
Log("State successfully persisted") Log("State successfully persisted")
storage.Close() storage.Close()
rollbar.Wait()
Log("Storage closed") Log("Storage closed")
Log("Server stopped")
os.Exit(1) Log("Waiting for rollbar...")
rollbar.Wait()
Log("Stopped")
os.Exit(0)
}() }()
} }
func main() { func main() {
SetupLogging()
SetupConfig() SetupConfig()
SetupLogging()
SetupStorage() SetupStorage()
SetupServer() SetupServer()
HandleShutdown() HandleShutdown()