feat: seed default plugins/pipelines, auto-enqueue jobs on asset ingest
- Migration seeds metadata_extractor, sidecar_sync, no_op plugins - Pipelines: extract_metadata → metadata_extractor, sync_sidecar → sidecar_sync - Worker reacts to AssetIngested → enqueues ExtractMetadata job - Worker reacts to SidecarSyncRequested → enqueues SyncSidecar job - Closes the ingest-to-processing loop end-to-end
This commit is contained in:
@@ -16,5 +16,8 @@ pub trait EventConsumer: Send + Sync {
|
||||
#[async_trait]
|
||||
pub trait EventStore: Send + Sync {
|
||||
async fn append(&self, event: &DomainEvent) -> Result<(), DomainError>;
|
||||
async fn query_by_aggregate(&self, aggregate_id: &SystemId) -> Result<Vec<DomainEvent>, DomainError>;
|
||||
async fn query_by_aggregate(
|
||||
&self,
|
||||
aggregate_id: &SystemId,
|
||||
) -> Result<Vec<DomainEvent>, DomainError>;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,8 @@ pub trait UsageLedgerRepository: Send + Sync {
|
||||
pub trait IngestTransaction: Send + Sync {
|
||||
async fn save_asset(&self, asset: &Asset) -> Result<(), DomainError>;
|
||||
async fn save_session(&self, session: &IngestSession) -> Result<(), DomainError>;
|
||||
async fn find_quota(&self, owner_id: &SystemId) -> Result<Option<QuotaDefinition>, DomainError>;
|
||||
async fn find_quota(&self, owner_id: &SystemId)
|
||||
-> Result<Option<QuotaDefinition>, DomainError>;
|
||||
async fn sum_usage(
|
||||
&self,
|
||||
user_id: &SystemId,
|
||||
|
||||
Reference in New Issue
Block a user