SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Fix s3.clean.uploads (#4766)
SmsS41e72579ac7d9
diff --git a/weed/shell/command_s3_clean_uploads.go b/weed/shell/command_s3_clean_uploads.goindex 81af4bbb75..2be61f72ad 100644--- a/weed/shell/command_s3_clean_uploads.go+++ b/weed/shell/command_s3_clean_uploads.go@@ -3,13 +3,14 @@ package shellimport ("flag""fmt"- "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"- "github.com/seaweedfs/seaweedfs/weed/security"- "github.com/seaweedfs/seaweedfs/weed/util""io""math""time"+ "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"+ "github.com/seaweedfs/seaweedfs/weed/security"+ "github.com/seaweedfs/seaweedfs/weed/util"+"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb")@@ -17,8 +18,7 @@ func init() {Commands = append(Commands, &commandS3CleanUploads{})}-type commandS3CleanUploads struct {-}+type commandS3CleanUploads struct{}func (c *commandS3CleanUploads) Name() string {return "s3.clean.uploads"@@ -34,14 +34,13 @@ func (c *commandS3CleanUploads) Help() string {}func (c *commandS3CleanUploads) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {-bucketCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)uploadedTimeAgo := bucketCommand.Duration("timeAgo", 24*time.Hour, "created time before now. \"1.5h\" or \"2h45m\". Valid time units are \"m\", \"h\"")if err = bucketCommand.Parse(args); err != nil {return nil}- signingKey := util.GetViper().GetString("jwt.signing.key")+ signingKey := util.GetViper().GetString("jwt.filer_signing.key")var filerBucketsPath stringfilerBucketsPath, err = readFilerBucketsPath(commandEnv)@@ -65,7 +64,6 @@ func (c *commandS3CleanUploads) Do(args []string, commandEnv *CommandEnv, writer}return err-}func (c *commandS3CleanUploads) cleanupUploads(commandEnv *CommandEnv, writer io.Writer, filerBucketsPath string, bucket string, timeAgo time.Duration, signingKey string) error {@@ -99,5 +97,4 @@ func (c *commandS3CleanUploads) cleanupUploads(commandEnv *CommandEnv, writer io}return nil-}