Skip to content

Commit

Permalink
Code review changes.
Browse files Browse the repository at this point in the history
Added suggestions + regenerated the store interface mock.
  • Loading branch information
aforge committed Dec 7, 2022
1 parent 7887fa2 commit 57049c7
Show file tree
Hide file tree
Showing 6 changed files with 567 additions and 497 deletions.
6 changes: 2 additions & 4 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,8 @@ type accountGcConfig struct {
GcPeriod int `json:"gc_period"`
// Number of accounts to delete in one pass.
GcBlockSize int `json:"gc_block_size"`
// Minimum days since account was last modified.
// Minimum hours since account was last modified.
GcMinAccountAge int `json:"gc_min_account_age"`
// If true, GC will only print accounts to delete without actually deleting them.
DryRun bool `json:"dry_run"`
}

// Large file handler config.
Expand Down Expand Up @@ -563,7 +561,7 @@ func main() {
if config.AccountGC.GcPeriod > 0 && config.AccountGC.GcBlockSize > 0 &&
config.AccountGC.GcMinAccountAge > 0 {
gcPeriod := time.Second * time.Duration(config.AccountGC.GcPeriod)
stopAccountGc := garbageCollectUsers(gcPeriod, config.AccountGC.GcBlockSize, config.AccountGC.GcMinAccountAge, config.AccountGC.DryRun)
stopAccountGc := garbageCollectUsers(gcPeriod, config.AccountGC.GcBlockSize, config.AccountGC.GcMinAccountAge)

defer func() {
stopAccountGc <- true
Expand Down
Loading

0 comments on commit 57049c7

Please sign in to comment.