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
@@ -10,6 +10,7 @@ import (
"strings"
"time"
"github.com/chrislusf/seaweedfs/weed/util/grace"
"golang.org/x/net/webdav"
"google.golang.org/grpc"
@@ -100,7 +101,7 @@ type WebDavFile struct {
func NewWebDavFileSystem(option *WebDavOption) (webdav.FileSystem, error) {
chunkCache := chunk_cache.NewChunkCache(256, option.CacheDir, option.CacheSizeMB)
util.OnInterrupt(func() {
grace.OnInterrupt(func() {
chunkCache.Shutdown()
})
return &WebDavFileSystem{