This commit is contained in:
Andrea Spacca
2021-01-05 17:24:16 +01:00
parent 6ac6c8fa99
commit d3381a2293
3 changed files with 15 additions and 17 deletions

View File

@ -377,7 +377,6 @@ func New() *Cmd {
options = append(options, server.RateLimit(v))
}
purgeDays := c.Int("purge-days")
purgeInterval := c.Int("purge-interval")
if purgeDays > 0 && purgeInterval > 0 {

View File

@ -194,7 +194,6 @@ func Purge(days, interval int) OptionFn {
}
}
func ForceHTTPs() OptionFn {
return func(srvr *Server) {
srvr.forceHTTPs = true

View File

@ -163,7 +163,7 @@ func NewS3Storage(accessKey, secretKey, bucketName string, purgeDays int, region
session: sess,
logger: logger,
noMultipart: disableMultipart,
purgeDays: time.Duration(purgeDays * 24) * time.Hour,
purgeDays: time.Duration(purgeDays*24) * time.Hour,
}, nil
}
@ -645,7 +645,7 @@ func NewStorjStorage(access, bucket string, purgeDays int, logger *log.Logger) (
return nil, err
}
instance.purgeDays = time.Duration(purgeDays * 24) * time.Hour
instance.purgeDays = time.Duration(purgeDays*24) * time.Hour
instance.logger = logger