From aae24382399f755cfd80e352be7f5aa584aa5470 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Thu, 19 Jun 2025 11:47:31 -0400 Subject: Hoist heartbeat configuration out to the web handler. The _snapshot_ is specifically a snapshot of app state. The purpose of the response struct is to annotate the snapshot with information that isn't from the app, but rather from the request or the web layer. The heartbeat timeout isn't ever used by the app layer in any way; it's used by the Axum handler for `/api/events`, instead. I straight-up missed this when I wrote the original heartbeat changes. --- src/boot/app.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/boot/app.rs') diff --git a/src/boot/app.rs b/src/boot/app.rs index cd45c38..f531afe 100644 --- a/src/boot/app.rs +++ b/src/boot/app.rs @@ -3,7 +3,7 @@ use sqlx::sqlite::SqlitePool; use super::Snapshot; use crate::{ channel::{self, repo::Provider as _}, - event::{Heartbeat, repo::Provider as _}, + event::repo::Provider as _, message::repo::Provider as _, name, user::{self, repo::Provider as _}, @@ -21,7 +21,6 @@ impl<'a> Boot<'a> { pub async fn snapshot(&self) -> Result { let mut tx = self.db.begin().await?; let resume_point = tx.sequence().current().await?; - let heartbeat = Heartbeat::TIMEOUT; let users = tx.users().all(resume_point).await?; let channels = tx.channels().all(resume_point).await?; @@ -46,7 +45,6 @@ impl<'a> Boot<'a> { Ok(Snapshot { resume_point, - heartbeat, users, channels, messages, -- cgit v1.2.3