diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-20 19:18:32 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-20 19:18:32 +0200 |
| commit | 13aeedfbb9271444ca42efb45bbe0986ae7610ce (patch) | |
| tree | ac041fa80a5fa0bd845385f2f1c5c983115a1ade /cli/cli.go | |
| parent | 5242b55d878d56b71d443a440c7017015b9df2dd (diff) | |
feat(ride): skip rides without track points in backtest
Diffstat (limited to 'cli/cli.go')
| -rw-r--r-- | cli/cli.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3,6 +3,7 @@ package cli import ( "context" "database/sql" + "errors" "flag" "fmt" "log/slog" @@ -94,6 +95,9 @@ func runBacktest(db *sql.DB) error { } parsed, err := ride.ParseFile(ride.GPXRideParser{}, item.GPXPath) if err != nil { + if errors.Is(err, ride.ErrNoTrackPoints) { + continue + } slog.Warn("Failed to parse ride GPX", "ride", item.ExternalID, "file", item.GPXPath, "error", err) continue } |
