db: refresh_sessions migration + SQLite/Postgres adapters

This commit is contained in:
2026-06-11 14:31:46 +02:00
parent ef9ecbae06
commit 3a3f3b3889
8 changed files with 255 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
goal: w.goal,
user_settings: w.user_settings,
remote_goal: w.remote_goal,
refresh_session: Arc::new(domain::testing::PanicRefreshSessionRepository) as _,
refresh_session: Arc::new(postgres::PostgresRefreshSessionAdapter::new(w.pool.clone())) as _,
db_pool: DbPool::Postgres(w.pool),
})
}
@@ -130,7 +130,7 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
goal: w.goal,
user_settings: w.user_settings,
remote_goal: w.remote_goal,
refresh_session: Arc::new(domain::testing::PanicRefreshSessionRepository) as _,
refresh_session: Arc::new(sqlite::SqliteRefreshSessionAdapter::new(w.pool.clone())) as _,
db_pool: DbPool::Sqlite(w.pool),
})
}