feat: worker plugin system — domain ports, pipeline executor, built-in plugins
- PluginExecutor + PluginRegistry ports in domain - ExecutePipelineCommand orchestrates job→pipeline→plugin steps - ProcessNextJobCommand polls + executes next queued job - InMemoryPluginRegistry, NoOp/MetadataExtractor/SidecarSync plugins - Worker main rewritten with poll loop, factories module for DI - Deleted template job/runner/jobs remnants
This commit is contained in:
22
crates/worker/src/factories/processing.rs
Normal file
22
crates/worker/src/factories/processing.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use application::processing::{ExecutePipelineHandler, ProcessNextJobHandler};
|
||||
use domain::ports::{EventPublisher, PluginRegistry};
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::Repos;
|
||||
|
||||
pub fn build_process_next_handler(
|
||||
repos: &Repos,
|
||||
registry: Arc<dyn PluginRegistry>,
|
||||
event_pub: Arc<dyn EventPublisher>,
|
||||
) -> ProcessNextJobHandler {
|
||||
let execute_pipeline = Arc::new(ExecutePipelineHandler::new(
|
||||
repos.job.clone(),
|
||||
repos.batch.clone(),
|
||||
repos.pipeline.clone(),
|
||||
repos.plugin.clone(),
|
||||
registry,
|
||||
event_pub,
|
||||
));
|
||||
|
||||
ProcessNextJobHandler::new(repos.job.clone(), execute_pipeline)
|
||||
}
|
||||
Reference in New Issue
Block a user