mount: add grpc method to adjust quota
This commit is contained in:
@@ -10,12 +10,14 @@ import (
|
||||
|
||||
func (wfs *WFS) loopCheckQuota() {
|
||||
|
||||
if wfs.option.Quota <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
for {
|
||||
|
||||
time.Sleep(61 * time.Second)
|
||||
|
||||
if wfs.option.Quota <= 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
err := wfs.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
request := &filer_pb.StatisticsRequest{
|
||||
@@ -47,7 +49,6 @@ func (wfs *WFS) loopCheckQuota() {
|
||||
glog.Warningf("read quota usage: %v", err)
|
||||
}
|
||||
|
||||
time.Sleep(61 * time.Second)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user