diff options
| author | chrislu <chris.lu@gmail.com> | 2024-09-28 20:22:57 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-09-28 20:23:01 -0700 |
| commit | 701abbb9df1b21b2acef8af6b5f1093754dd4f40 (patch) | |
| tree | 631280df2bf1a541390df0f1683410b93b96b17c /weed/shell/command_remote_uncache.go | |
| parent | dad3a26fb6a114e8b689ae60935e5f48d29cdd14 (diff) | |
| download | seaweedfs-701abbb9df1b21b2acef8af6b5f1093754dd4f40.tar.xz seaweedfs-701abbb9df1b21b2acef8af6b5f1093754dd4f40.zip | |
add IsResourceHeavy() to command interface
Diffstat (limited to 'weed/shell/command_remote_uncache.go')
| -rw-r--r-- | weed/shell/command_remote_uncache.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/shell/command_remote_uncache.go b/weed/shell/command_remote_uncache.go index 25e51ff74..b597b042c 100644 --- a/weed/shell/command_remote_uncache.go +++ b/weed/shell/command_remote_uncache.go @@ -41,6 +41,10 @@ func (c *commandRemoteUncache) Help() string { ` } +func (c *commandRemoteUncache) IsResourceHeavy() bool { + return false +} + func (c *commandRemoteUncache) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { remoteUncacheCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) @@ -165,12 +169,12 @@ func (ff *FileFilter) matches(entry *filer_pb.Entry) bool { } } if *ff.minAge != -1 { - if entry.Attributes.Crtime + *ff.minAge > time.Now().Unix() { + if entry.Attributes.Crtime+*ff.minAge > time.Now().Unix() { return false } } if *ff.maxAge != -1 { - if entry.Attributes.Crtime + *ff.maxAge < time.Now().Unix() { + if entry.Attributes.Crtime+*ff.maxAge < time.Now().Unix() { return false } } |
