feat: add swimlanes

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-03-07 22:53:48 +01:00
parent 9fe1630986
commit 45353089c2
51 changed files with 3845 additions and 147 deletions

View File

@@ -8,7 +8,7 @@ use std::net::SocketAddr;
use std::sync::Arc;
use axum::Router;
use forage_core::session::{InMemorySessionStore, SessionStore};
use forage_core::session::{FileSessionStore, SessionStore};
use forage_db::PgSessionStore;
use tower_http::services::ServeDir;
use tower_http::trace::TraceLayer;
@@ -63,10 +63,11 @@ async fn main() -> anyhow::Result<()> {
pg_store
} else {
tracing::info!("using in-memory session store (set DATABASE_URL for persistence)");
let mem_store = Arc::new(InMemorySessionStore::new());
let session_dir = std::env::var("SESSION_DIR").unwrap_or_else(|_| "target/sessions".into());
tracing::info!("using file session store at {session_dir} (set DATABASE_URL for PostgreSQL)");
let file_store = Arc::new(FileSessionStore::new(&session_dir).expect("failed to create session dir"));
let reaper = mem_store.clone();
let reaper = file_store.clone();
tokio::spawn(async move {
let mut interval = tokio::time::interval(std::time::Duration::from_secs(300));
loop {
@@ -76,7 +77,7 @@ async fn main() -> anyhow::Result<()> {
}
});
mem_store
file_store
};
let forest_client = Arc::new(forest_client);