refactor: move AppContext to presentation crate, structurally enforce boundary
All checks were successful
CI / Check / Test (push) Successful in 39m33s

This commit is contained in:
2026-06-11 23:18:28 +02:00
parent b5cc7f8371
commit 57520c00f3
51 changed files with 268 additions and 377 deletions

View File

@@ -2,7 +2,10 @@ use std::sync::Arc;
use std::time::Duration;
use async_trait::async_trait;
use domain::{errors::DomainError, ports::{ImportSessionRepository, PeriodicJob}};
use domain::{
errors::DomainError,
ports::{ImportSessionRepository, PeriodicJob},
};
pub struct ImportSessionCleanupJob {
import_session: Arc<dyn ImportSessionRepository>,

View File

@@ -2,7 +2,10 @@ use std::sync::Arc;
use std::time::Duration;
use async_trait::async_trait;
use domain::{errors::DomainError, ports::{PeriodicJob, WatchEventRepository}};
use domain::{
errors::DomainError,
ports::{PeriodicJob, WatchEventRepository},
};
pub struct WatchEventCleanupJob {
watch_event: Arc<dyn WatchEventRepository>,

View File

@@ -114,10 +114,7 @@ impl PeriodicJob for WrapUpCleanupJob {
async fn run(&self) -> Result<(), DomainError> {
let cutoff = chrono::Utc::now().naive_utc() - chrono::Duration::days(7);
let n = self
.wrapup_repo
.delete_failed_older_than(cutoff)
.await?;
let n = self.wrapup_repo.delete_failed_older_than(cutoff).await?;
if n > 0 {
tracing::info!("wrapup cleanup: removed {n} failed records");
}