Skip to content

Commit

Permalink
feat(persisted-ops): Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ldebruijn committed Aug 9, 2024
1 parent 1079623 commit 07a3f3b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions internal/business/persistedoperations/persisted_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,9 @@ func (p *Handler) reloadProcessor() {
}

func (p *Handler) reload() error {
err := p.reloadFromRemote()
if err != nil {
// warn about the errors, do not stop reloading
p.log.Warn("Error(s) observed loading persisted operations from remote", "err", err)
}
_ = p.reloadFromRemote()

err = p.reloadFromLocalDir()
err := p.reloadFromLocalDir()
if err != nil {
p.log.Warn("Error loading from local dir", "err", err)
reloadCounter.WithLabelValues("ticker", "failure").Inc()
Expand All @@ -316,7 +312,7 @@ func (p *Handler) reloadFromRemote() error {

err := p.remoteLoader.Load(ctx)
if err != nil {
p.log.Error("Error loading files from bucket", "err", err)
p.log.Error("Error(s) loading files from remote", "err", err)
reloadCounter.WithLabelValues("remote", "failure").Inc()
return err
}
Expand Down

0 comments on commit 07a3f3b

Please sign in to comment.