//! Shared application state: one instance across all three task groups //! (axum server, ingestion + gloss worker, slow-loop scheduler). use std::sync::Arc; use sqlx::SqlitePool; use tokio::sync::Notify; use crate::atproto::publisher::Publisher; use crate::atproto::OAuth; use crate::config::Config; use crate::gloss::embed::Embedder; use crate::gloss::Ensemble; pub struct AppState { pub config: Config, pub pool: SqlitePool, pub oauth: OAuth, pub publisher: Publisher, pub ensemble: Ensemble, pub embedder: Embedder, /// Wakes the gloss worker when the durable queue gains work. pub gloss_notify: Notify, } pub type SharedState = Arc;