aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/weedfs_quota.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/weedfs_quota.go')
-rw-r--r--weed/mount/weedfs_quota.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/weed/mount/weedfs_quota.go b/weed/mount/weedfs_quota.go
index f9307a6b3..ac3e58e62 100644
--- a/weed/mount/weedfs_quota.go
+++ b/weed/mount/weedfs_quota.go
@@ -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)
}
}