Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
685 B · 26 lines
Rust
at dev
123456789101112131415161718192021222324252627//! 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<AppState>;