feat(worker): add FederationManagementHandler and wire into event loop
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
use application::services::{FederationEventService, NotificationEventService};
|
||||
use application::services::{
|
||||
FederationEventService, FederationManagementEventService, NotificationEventService,
|
||||
};
|
||||
use domain::{errors::DomainError, events::DomainEvent};
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -21,3 +23,13 @@ impl FederationHandler {
|
||||
self.service.process(event).await
|
||||
}
|
||||
}
|
||||
|
||||
pub struct FederationManagementHandler {
|
||||
pub service: Arc<FederationManagementEventService>,
|
||||
}
|
||||
|
||||
impl FederationManagementHandler {
|
||||
pub async fn handle(&self, event: &DomainEvent) -> Result<(), DomainError> {
|
||||
self.service.process(event).await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user