1
0
Fork 0

Verbose shutdown

This commit is contained in:
Gregory Eremin 2014-07-12 17:58:56 +07:00
parent 313677aa48
commit da544b85b5
1 changed files with 9 additions and 4 deletions

13
main.go
View File

@ -15,19 +15,24 @@ func HandleShutdown() {
go func() {
<-ch
SaveState()
Log("State successfully persisted")
storage.Close()
rollbar.Wait()
Log("Storage closed")
Log("Server stopped")
os.Exit(1)
Log("Waiting for rollbar...")
rollbar.Wait()
Log("Stopped")
os.Exit(0)
}()
}
func main() {
SetupLogging()
SetupConfig()
SetupLogging()
SetupStorage()
SetupServer()
HandleShutdown()