good stuff
This commit is contained in:
parent
ea8389ef40
commit
f4de0eeb9f
39 changed files with 5165 additions and 348 deletions
|
|
@ -339,7 +339,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
}
|
||||
info!("Loading travel time data from {}", tt_path.display());
|
||||
let travel_time_store = {
|
||||
let store = data::TravelTimeStore::load(tt_path, 50)?;
|
||||
let store = data::TravelTimeStore::load(tt_path, 200)?;
|
||||
info!(
|
||||
modes = store.available_modes.len(),
|
||||
"Travel time store loaded"
|
||||
|
|
@ -399,6 +399,9 @@ async fn main() -> anyhow::Result<()> {
|
|||
stripe_referral_coupon_id: cli.stripe_referral_coupon_id,
|
||||
});
|
||||
|
||||
// Start background PocketBase metrics poller (users, saved searches/properties counts)
|
||||
pocketbase::start_metrics_poller(state.clone());
|
||||
|
||||
let cors = CorsLayer::new()
|
||||
.allow_origin(
|
||||
state
|
||||
|
|
@ -440,6 +443,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
let state_invite_get = state.clone();
|
||||
let state_redeem_invite = state.clone();
|
||||
let state_journey = state.clone();
|
||||
let state_telemetry = state.clone();
|
||||
|
||||
let api = Router::new()
|
||||
.route(
|
||||
|
|
@ -573,6 +577,13 @@ async fn main() -> anyhow::Result<()> {
|
|||
.route(
|
||||
"/s/{code}",
|
||||
get(move |path| routes::get_short_url(state_short_url.clone(), path)),
|
||||
)
|
||||
.route(
|
||||
"/api/telemetry",
|
||||
post(move |ext, headers, body| {
|
||||
let _ = state_telemetry.clone();
|
||||
routes::post_telemetry(ext, headers, body)
|
||||
}),
|
||||
);
|
||||
|
||||
// Add tile routes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue