Skip to content

Commit

Permalink
address pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
efd6 committed Oct 6, 2023
1 parent f927797 commit c70e6c7
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,10 @@ func (p *azure) runIncrementalUpdate(inputCtx v2.Context, store *kvstore.Store,
return err
}

wantUsers := p.conf.wantUsers()
wantDevices := p.conf.wantDevices()
if (updatedUsers.Len() != 0 && wantUsers) || (updatedDevices.Len() != 0 && wantDevices) {
if updatedUsers.Len() != 0 || updatedDevices.Len() != 0 {
tracker := kvstore.NewTxTracker(ctx)

if updatedUsers.Len() != 0 && wantUsers {
if updatedUsers.Len() != 0 {
updatedUsers.ForEach(func(id uuid.UUID) {
u, ok := state.users[id]
if !ok {
Expand All @@ -228,7 +226,7 @@ func (p *azure) runIncrementalUpdate(inputCtx v2.Context, store *kvstore.Store,
})
}

if updatedDevices.Len() != 0 && wantDevices {
if updatedDevices.Len() != 0 {
updatedDevices.ForEach(func(id uuid.UUID) {
d, ok := state.devices[id]
if !ok {
Expand Down

0 comments on commit c70e6c7

Please sign in to comment.