This repository has reached end of life. Further development on GTFS-rt ingestion will occur in https://github.com/catenarytransit/catenary-backend
Kactus (Kyler's Automated Cache for Transport Unification & Synchronisation) is a cache server written in Rust and using Redis. It is open source under the GPL 3.0 license.
Use Kactus hosted by Catenary's servers!
https://kactus.catenarymaps.org/gtfsrt/?feed=[onestopid]&category=[category]
Check uptime: https://stats.uptimerobot.com/xWx7zCm4p0
Onestop Feed IDs should be realtime feed ids from transitland/transitland-atlas aka https://transit.land/
Valid categories are
vehicles
trips
alerts
The api returns 404 if the category for the feed doesn't exist.
Example of valid url https://kactus.catenarymaps.org/gtfsrt/?feed=f-metro~losangeles~bus~rt&category=vehicles
The list of avaliable feeds is at https://kactus.catenarymaps.org/gtfsrttimes
https://kactus.catenarymaps.org/gtfsrtasjson/?feed=[onestopid]&category=[category]
or use raw for Rust-info
https://kactus.catenarymaps.org/gtfsrtasjson/?feed=[onestopid]&category=[category]&raw=true
like so
https://kactus.catenarymaps.org/gtfsrtasjson/?feed=f-metro~losangeles~bus~rt&category=vehicles&raw=true
arch linux:
sudo pacman -S redis protobuf-compiler; sudo systemctl start redis-server;
ubuntu:
sudo apt install protobuf-compiler build-essential gcc pkg-config libssl-dev postgresql unzip wget
sudo systemctl start redis-server
cargo run --bin ingestv2
sudo cp systemd* /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now kactus* zotgtfsrt.service
If the auth_type is set to url
, then any instance of PASSWORD
in the urls will be replaced with the value of auth_password
you can specify the urls file to use, but by default, it is urls.csv
cargo run --bin ingestv2 -- --urls public-urls.csv
you can add the threads
parameter
cargo run --bin ingestv2 -- --urls public-urls.csv --threads 10
you can also add the timeout parameter in milliseconds, the default being 15000
ms aka 15 seconds.
---timeout 10000
Basically this skirts around the 429 rate limit error by sending requests almost exactly 30 seconds after the last request.
First, paste your metrolink key into the file metrolink-key.txt
Then run
cargo run --bin ingestmetrolink
For unix users, running git config core.hooksPath .githooks
is required.
Pull requests will not be merged without this.
No option exists for Windows users at the moment. Please try WSL Ubuntu for the moment. We're working on adding this.