Skip to content

Commit

Permalink
feat(reloading): Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ldebruijn committed Oct 2, 2023
1 parent 0ba21e2 commit 001f228
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions internal/business/persisted_operations/persisted_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,10 @@ func NewPersistedOperations(log *slog.Logger, cfg Config, loader LocalLoader, re
// buffered in case we dont have reloading enabled
done := make(chan bool, 1)

cache, err := loader.Load(context.Background())
if err != nil {
return nil, err
}

log.Info("Loaded persisted operations", "amount", len(cache))

poh := &PersistedOperationsHandler{
log: log,
cfg: cfg,
cache: cache,
cache: map[string]string{},
remoteLoader: remoteLoader,
dirLoader: loader,
refreshTicker: refreshTicker,
Expand All @@ -114,7 +107,7 @@ func NewPersistedOperations(log *slog.Logger, cfg Config, loader LocalLoader, re
}

poh.reloadFromRemote()
err = poh.reloadFromLocalDir()
err := poh.reloadFromLocalDir()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 001f228

Please sign in to comment.