improve graceful reload feature for ghttp.Server

This commit is contained in:
john
2020-07-25 14:09:03 +08:00
parent 04dee090a3
commit 9b8d63e21b
2 changed files with 5 additions and 4 deletions

View File

@ -6,6 +6,7 @@ import (
func main() {
s := g.Server()
s.SetConfigWithMap(g.Map{"Graceful": true})
s.EnableAdmin()
s.SetPort(8199)
s.Run()

View File

@ -222,10 +222,10 @@ func (m *Manager) init() {
} else if m.options.Path != "" {
files, _ := gfile.ScanDirFile(m.options.Path, "*.*", true)
if len(files) == 0 {
intlog.Printf(
"no i18n files found in configured directory: %s",
m.options.Path,
)
//intlog.Printf(
// "no i18n files found in configured directory: %s",
// m.options.Path,
//)
return
}
var (