From 3786f81ce1cfaee45e18f3cba265f6ad322ad138 Mon Sep 17 00:00:00 2001 From: Kyler Chin <7539174+kylerchin@users.noreply.github.com> Date: Wed, 20 Mar 2024 21:07:43 -0700 Subject: [PATCH] Add fetch interval ms column to realtime table --- migrations/20240110110356_init.sql | 5 +++-- src/maple/main.rs | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/migrations/20240110110356_init.sql b/migrations/20240110110356_init.sql index f18d1f9e..3ec4d122 100644 --- a/migrations/20240110110356_init.sql +++ b/migrations/20240110110356_init.sql @@ -422,7 +422,8 @@ CREATE TABLE IF NOT EXISTS gtfs.realtime_passwords ( passwords text[], header_auth_key text, header_auth_value_prefix text, - url_auth_key text + url_auth_key text, + interval_ms integer ); CREATE TABLE IF NOT EXISTS gtfs.static_passwords ( @@ -430,5 +431,5 @@ CREATE TABLE IF NOT EXISTS gtfs.static_passwords ( passwords text[], header_auth_key text, header_auth_value_prefix text, - url_auth_key text + url_auth_key text, ); \ No newline at end of file diff --git a/src/maple/main.rs b/src/maple/main.rs index e52bfbb2..966cf102 100644 --- a/src/maple/main.rs +++ b/src/maple/main.rs @@ -164,8 +164,8 @@ async fn run_ingest() -> Result<(), Box> { // Unzip the file and handle any folder nesting // process into GTFS representation // run function to insert GTFS raw data - // use k/d tree presentation to calculate line optimisation and transfer patterns (not clear how this works, needs further research) - // hand off to routing algorithm preprocessing engine Prarie (needs further research and development) + // (todo) use k/d tree presentation to calculate line optimisation and transfer patterns (not clear how this works, needs further research) + // (todo) hand off to routing algorithm preprocessing engine Prarie (needs further research and development) // 1. update metadata futures::stream::iter(eligible_feeds.iter() @@ -217,6 +217,9 @@ async fn run_ingest() -> Result<(), Box> { ); // todo! perform additional checks to ensure feed is not a zip bomb + + // create thread pool + // process GTFS and insert into system } //determine if the old one should be deleted, if so, delete it