Skip to content

Commit

Permalink
feat: reload seed on refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jul 5, 2023
1 parent 85e2eb7 commit 72cbb5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/wishlist/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,15 @@ var serverCmd = &cobra.Command{
go func() {
for range ticker.C {
log.Info("refreshing endpoints...")
ctx := context.Background()
seed, err := getSeedEndpoints(ctx)
if err != nil {
log.Error("could not get seed endpoints", "error", err)
continue
}
reloaded, err := getConfigFile(path, seed)
if err != nil {
log.Error("could not load configuration file", "error", err)
continue
}
config.EndpointChan <- reloaded.Endpoints
Expand Down

0 comments on commit 72cbb5d

Please sign in to comment.