Skip to content

Commit

Permalink
define default limit
Browse files Browse the repository at this point in the history
  • Loading branch information
cheggaaa committed Mar 11, 2024
1 parent 42aa4d9 commit 0f93431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions etc/any-sync-filenode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ network:
creationTime: 2023-04-13T20:29:23.453806629+02:00
networkStorePath: .
networkUpdateIntervalSec: 600
defaultLimit: 1073741824
3 changes: 3 additions & 0 deletions index/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ func (ri *redisIndex) Init(a *app.App) (err error) {
// todo: move to config
ri.persistTtl = time.Hour
ri.defaultLimit = conf.DefaultLimit
if ri.defaultLimit == 0 {
ri.defaultLimit = 1 << 30
}
return
}

Expand Down

0 comments on commit 0f93431

Please sign in to comment.