Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saurav-malani committed Apr 4, 2023
1 parent 496d786 commit e06fa31
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions enterprise/suppress-user/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,17 @@ func (m *Factory) Setup(ctx context.Context, backendConfig backendconfig.Backend
func() error { return fullSyncer.Sync(ctx) },
5*time.Second)

m.retryIndefinitely(ctx, func() error {
_, err = os.Create(filepath.Join(fullSuppressionPath, model.SyncDoneMarker))
return err
}, 1*time.Second)

_, err = os.Create(filepath.Join(fullSuppressionPath, model.SyncDoneMarker))
if err != nil {
m.Log.Errorf("Could not create sync done marker: %w", err)
}
repo.Switch(fullRepo)
latestSyncCancel()
fullSyncer.SyncLoop(ctx)
_ = fullRepo.Stop()
err = fullRepo.Stop()
if err != nil {
m.Log.Warnf("Full Sync failed: could not stop repo: %w", err)
}
})
return newHandler(repo, m.Log), nil
} else {
Expand Down

0 comments on commit e06fa31

Please sign in to comment.