refactor: remaining MEDIUM — CQRS splits, DI Deps, profile dedup, event Value, response enum
M1: MovieRepository→MovieCommand/MovieQuery, WatchEventRepository→ WatchEventCommand/WatchEventQuery M2: goals/ and import/ use Deps structs M7: extract upload_image helper in update_profile M8: FederationDeliveryRequested activity_json String→serde_json::Value M11: UserProfileResponse uses ProfileViewData enum
This commit is contained in:
@@ -4,7 +4,7 @@ use std::time::Duration;
|
||||
use async_trait::async_trait;
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
ports::{MovieDeduplicator, MovieRepository, ObjectStorage, PeriodicJob},
|
||||
ports::{MovieDeduplicator, MovieQuery, ObjectStorage, PeriodicJob},
|
||||
};
|
||||
|
||||
use crate::movies::merge_duplicates::{MergeDuplicatesDeps, execute};
|
||||
@@ -15,13 +15,13 @@ pub struct MovieDeduplicationJob {
|
||||
|
||||
impl MovieDeduplicationJob {
|
||||
pub fn new(
|
||||
movie: Arc<dyn MovieRepository>,
|
||||
movie: Arc<dyn MovieQuery>,
|
||||
deduplicator: Arc<dyn MovieDeduplicator>,
|
||||
object_storage: Arc<dyn ObjectStorage>,
|
||||
) -> Self {
|
||||
Self {
|
||||
deps: MergeDuplicatesDeps {
|
||||
movie,
|
||||
movie_query: movie,
|
||||
deduplicator,
|
||||
object_storage,
|
||||
},
|
||||
|
||||
@@ -4,15 +4,15 @@ use std::time::Duration;
|
||||
use async_trait::async_trait;
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
ports::{PeriodicJob, WatchEventRepository},
|
||||
ports::{PeriodicJob, WatchEventCommand},
|
||||
};
|
||||
|
||||
pub struct WatchEventCleanupJob {
|
||||
watch_event: Arc<dyn WatchEventRepository>,
|
||||
watch_event: Arc<dyn WatchEventCommand>,
|
||||
}
|
||||
|
||||
impl WatchEventCleanupJob {
|
||||
pub fn new(watch_event: Arc<dyn WatchEventRepository>) -> Self {
|
||||
pub fn new(watch_event: Arc<dyn WatchEventCommand>) -> Self {
|
||||
Self { watch_event }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user