feat: wire real wrapup adapters into presentation + worker
This commit is contained in:
@@ -36,6 +36,8 @@ pub struct WorkerDbOutput {
|
||||
pub ap_content: Arc<dyn LocalApContentQuery>,
|
||||
pub image_ref_command: Arc<dyn ImageRefCommand>,
|
||||
pub image_ref_query: Arc<dyn ImageRefQuery>,
|
||||
pub wrapup_stats: Arc<dyn domain::ports::WrapUpStatsQuery>,
|
||||
pub wrapup_repo: Arc<dyn domain::ports::WrapUpRepository>,
|
||||
pub db_pool: DbPool,
|
||||
}
|
||||
|
||||
@@ -76,6 +78,8 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
|
||||
ap_content: w.ap_content,
|
||||
image_ref_command,
|
||||
image_ref_query,
|
||||
wrapup_stats: w.wrapup_stats,
|
||||
wrapup_repo: w.wrapup_repo,
|
||||
db_pool: DbPool::Postgres(w.pool),
|
||||
})
|
||||
}
|
||||
@@ -113,6 +117,8 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
|
||||
ap_content: w.ap_content,
|
||||
image_ref_command,
|
||||
image_ref_query,
|
||||
wrapup_stats: w.wrapup_stats,
|
||||
wrapup_repo: w.wrapup_repo,
|
||||
db_pool: DbPool::Sqlite(w.pool),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -92,8 +92,8 @@ async fn main() -> anyhow::Result<()> {
|
||||
social_query: fed_social_query,
|
||||
#[cfg(not(feature = "federation"))]
|
||||
social_query: Arc::new(domain::testing::NoopSocialQueryPort),
|
||||
wrapup_stats: Arc::new(domain::testing::PanicWrapUpStatsQuery) as Arc<dyn domain::ports::WrapUpStatsQuery>,
|
||||
wrapup_repo: Arc::new(domain::testing::PanicWrapUpRepository) as Arc<dyn domain::ports::WrapUpRepository>,
|
||||
wrapup_stats: db.wrapup_stats,
|
||||
wrapup_repo: db.wrapup_repo,
|
||||
},
|
||||
services: Services {
|
||||
auth: auth_service,
|
||||
|
||||
Reference in New Issue
Block a user