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:
26
crates/worker/src/plugins/no_op.rs
Normal file
26
crates/worker/src/plugins/no_op.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use async_trait::async_trait;
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
ports::PluginExecutor,
|
||||
value_objects::{StructuredData, SystemId},
|
||||
};
|
||||
use tracing::info;
|
||||
|
||||
pub struct NoOpPlugin;
|
||||
|
||||
#[async_trait]
|
||||
impl PluginExecutor for NoOpPlugin {
|
||||
fn plugin_name(&self) -> &str {
|
||||
"no_op"
|
||||
}
|
||||
|
||||
async fn execute(
|
||||
&self,
|
||||
asset_id: Option<SystemId>,
|
||||
_payload: &StructuredData,
|
||||
_config: &StructuredData,
|
||||
) -> Result<StructuredData, DomainError> {
|
||||
info!(asset_id = ?asset_id, "no_op plugin executed");
|
||||
Ok(StructuredData::new())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user