mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-26 15:00:48 +01:00
add IsResourceHeavy() to command interface
This commit is contained in:
1 parent
dad3a26fb6
commit
701abbb9df
73 files changed
+295
-2
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user