Skip to content

Commit

Permalink
feat(updater): log warning about using -minratio
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Sep 24, 2023
1 parent b787e12 commit dc8fc5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/updater/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"

"github.com/qdm12/gluetun/internal/models"
"github.com/qdm12/gluetun/internal/provider/common"
)

type Provider interface {
Expand All @@ -23,6 +24,10 @@ func (u *Updater) updateProvider(ctx context.Context, provider Provider,
minServers := int(minRatio * float64(existingServersCount))
servers, err := provider.FetchServers(ctx, minServers)
if err != nil {
if errors.Is(err, common.ErrNotEnoughServers) {
u.logger.Warn("note: if running the update manually, you can use the flag " +
"-minratio to allow the update to succeed with less servers found")
}
return fmt.Errorf("getting servers: %w", err)
}

Expand Down

0 comments on commit dc8fc5f

Please sign in to comment.