refacotr: move signal handling and pprof to grace package

This commit is contained in:
wuyuxiang committed 2020-04-28 14:10:23 +08:00
1 parent 2a7957b4ca
commit 6850d28d6b
13 files changed
+26 -29

No files matched your search

+2 -1
View File
@@ -8,6 +8,7 @@ import (
"strings"
"github.com/chrislusf/raft/protobuf"
"github.com/chrislusf/seaweedfs/weed/util/grace"
"github.com/gorilla/mux"
"google.golang.org/grpc/reflection"
@@ -82,7 +83,7 @@ func runMaster(cmd *Command, args []string) bool {
util.LoadConfiguration("master", false)
runtime.GOMAXPROCS(runtime.NumCPU())
util.SetupProfiling(*masterCpuProfile, *masterMemProfile)
grace.SetupProfiling(*masterCpuProfile, *masterMemProfile)
if err := util.TestFolderWritable(*m.metaFolder); err != nil {
glog.Fatalf("Check Meta Folder (-mdir) Writable %s : %s", *m.metaFolder, err)