Skip to content

Commit

Permalink
disable geolocate cache and refactor bus trips decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
jonerrr committed Aug 13, 2024
1 parent 25597e5 commit 4582dc1
Show file tree
Hide file tree
Showing 13 changed files with 380 additions and 389 deletions.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

2 changes: 0 additions & 2 deletions backend/migrations/20240613230108_bus_trips.up.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
-- maybe should we instead put bus trips in same table as trains (call it vehicles)
CREATE TABLE IF NOT EXISTS bus_trips (
-- generate uuid from mta trip id, route id, direction, vehicle
id UUID PRIMARY KEY,
mta_id VARCHAR NOT NULL,
vehicle_id INTEGER NOT NULL,
start_date DATE NOT NULL,
-- get from start_date, number in id, or first stop update, or lastly when inserted
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
-- 0 = south, 1 = north
direction SMALLINT NOT NULL,
Expand Down
1 change: 0 additions & 1 deletion backend/src/alerts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ async fn decode(pool: &PgPool) -> Result<(), DecodeFeedError> {

// let mut msgs = Vec::new();
// write!(msgs, "{:#?}", feed).unwrap();
// tokio::fs::remove_file("./alerts.txt").await.ok();
// tokio::fs::write("./alerts.txt", msgs).await.unwrap();

let mut in_feed_ids = vec![];
Expand Down
1 change: 0 additions & 1 deletion backend/src/bus/positions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ pub async fn decode_feed(pool: PgPool) -> Result<(), DecodeFeedError> {

// let mut msgs = Vec::new();
// write!(msgs, "{:#?}", feed).unwrap();
// tokio::fs::remove_file("./positions.txt").await.ok();
// tokio::fs::write("./positions.txt", msgs).await.unwrap();

// let stop_ids = sqlx::query!("SELECT id FROM bus_stops")
Expand Down
Loading

0 comments on commit 4582dc1

Please sign in to comment.