Add startup routine to fix orphaned objects

fixes #145, related to #142
This commit is contained in:
Lennart
2025-11-17 19:11:30 +01:00
parent ac73f3aaff
commit 08f526fa5b
5 changed files with 181 additions and 2 deletions

View File

@@ -69,7 +69,9 @@ async fn get_data_stores(
let (send, recv) = tokio::sync::mpsc::channel(1000);
let addressbook_store = Arc::new(SqliteAddressbookStore::new(db.clone(), send.clone()));
addressbook_store.repair_orphans().await?;
let cal_store = Arc::new(SqliteCalendarStore::new(db.clone(), send));
cal_store.repair_orphans().await?;
let subscription_store = Arc::new(SqliteStore::new(db.clone()));
let principal_store = Arc::new(SqlitePrincipalStore::new(db));
(