Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmd/api/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ func BuildApplication(cfg appconf.Config, gtfsCfg gtfs.Config) (*app.Application
var directionCalculator *gtfs.AdvancedDirectionCalculator
if gtfsManager != nil {
directionCalculator = gtfs.NewAdvancedDirectionCalculator(gtfsManager.GtfsDB.Queries)

err = gtfs.InitializeGlobalCache(context.Background(), gtfsManager.GtfsDB.Queries, directionCalculator)
if err != nil {
return nil, fmt.Errorf("failed to initialize global cache: %w", err)
}
}

// Select clock implementation based on environment
Expand Down
10 changes: 10 additions & 0 deletions gtfsdb/db.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions gtfsdb/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ ORDER BY
LIMIT
1;

-- name: GetAllStopIDs :many
SELECT
id
FROM
stops;

-- name: GetStopIDsForAgency :many
SELECT DISTINCT
s.id
Expand Down
30 changes: 30 additions & 0 deletions gtfsdb/query.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading