fix: restore accidentally deleted type definitions
Add back PipelineType enum, ProcessorType::pipeline() method, and OLLAMA_URL/EMBED_URL/LLM_HEALTH_URL config constants — all of which were deleted in commits78923a89and0856b92ewhile the referencing code was left intact, causing 5 compilation errors.
This commit is contained in:
@@ -395,6 +395,14 @@ pub struct MonitorJobStats {
|
||||
pub failed: i32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum PipelineType {
|
||||
Frame,
|
||||
Time,
|
||||
Cross,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ProcessorType {
|
||||
@@ -559,6 +567,23 @@ impl ProcessorType {
|
||||
ProcessorType::FiveW1H,
|
||||
]
|
||||
}
|
||||
|
||||
pub fn pipeline(&self) -> PipelineType {
|
||||
match self {
|
||||
ProcessorType::Yolo
|
||||
| ProcessorType::Ocr
|
||||
| ProcessorType::Face
|
||||
| ProcessorType::Pose
|
||||
| ProcessorType::VisualChunk => PipelineType::Frame,
|
||||
|
||||
ProcessorType::Asr
|
||||
| ProcessorType::Cut
|
||||
| ProcessorType::Asrx
|
||||
| ProcessorType::Scene
|
||||
| ProcessorType::Story
|
||||
| ProcessorType::FiveW1H => PipelineType::Time,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user