Skip to content

Commit

Permalink
Merge pull request #89 from anyproto/GO-3133-set-default-limit
Browse files Browse the repository at this point in the history
GO-3133 set default limit for existing account
  • Loading branch information
cheggaaa authored Mar 27, 2024
2 parents fb3b61c + 8f6e718 commit 668e3d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/filenode.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ func main() {

func Bootstrap(a *app.App) {
a.Register(account.New()).
Register(metric.New()).
Register(nodeconfsource.New()).
Register(nodeconfstore.New()).
Register(nodeconf.New()).
Expand All @@ -118,7 +119,6 @@ func Bootstrap(a *app.App) {
Register(store()).
Register(redisprovider.New()).
Register(index.New()).
Register(metric.New()).
Register(server.New()).
Register(filenode.New()).
Register(deletelog.New()).
Expand Down
4 changes: 4 additions & 0 deletions index/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ func (ri *redisIndex) getGroupEntry(ctx context.Context, key Key) (entry *groupE
return
}
groupEntryProto.GroupId = key.GroupId
if groupEntryProto.AccountLimit == 0 {
groupEntryProto.Limit = ri.defaultLimit
groupEntryProto.AccountLimit = ri.defaultLimit
}
return &groupEntry{GroupEntry: groupEntryProto}, nil
}

Expand Down

0 comments on commit 668e3d2

Please sign in to comment.