feat: frame/time pipeline split + output validation
- Add PipelineType enum + pipeline() to ProcessorType - Split ProcessorPool into frame_slots (max 2) and time_slots (max 1) - Add can_start_for() for pipeline-aware scheduling - Add validate_output_file() — checks JSON validity before marking complete - Add 3 unit tests for validate_output_file() - Create DESIGN/FRAME_TIME_PIPELINE_V1.0.md (492 lines)
This commit is contained in:
@@ -43,7 +43,7 @@ pub use mongodb_db::MongoDb;
|
||||
pub use postgres_db::{
|
||||
Bm25Result, CandidateRecord, CreateApiKeyConfig, FileIdentityRecord, FileRecord,
|
||||
HybridSearchResult, IdentityChunkRecord, IdentityDetailRecord, IdentityFaceRecord,
|
||||
IdentityFileRecord, MonitorJob, MonitorJobStats, MonitorJobStatus, PostgresDb,
|
||||
IdentityFileRecord, MonitorJob, MonitorJobStats, MonitorJobStatus, PipelineType, PostgresDb,
|
||||
ProcessorJobStatus, ProcessorResult, ProcessorType, ResourceRecord, VideoRecord, VideoStatus,
|
||||
};
|
||||
pub use qdrant_db::{QdrantDb, VectorPayload};
|
||||
|
||||
@@ -559,6 +559,31 @@ impl ProcessorType {
|
||||
ProcessorType::FiveW1H,
|
||||
]
|
||||
}
|
||||
|
||||
/// Pipeline type for scheduling: Frame-based, Time-based, or Cross (needs both).
|
||||
pub fn pipeline(&self) -> PipelineType {
|
||||
match self {
|
||||
Self::Cut
|
||||
| Self::Yolo
|
||||
| Self::Face
|
||||
| Self::Ocr
|
||||
| Self::Pose
|
||||
| Self::VisualChunk
|
||||
| Self::Scene => PipelineType::Frame,
|
||||
|
||||
Self::Asr | Self::Asrx => PipelineType::Time,
|
||||
|
||||
Self::Story | Self::FiveW1H => PipelineType::Cross,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pipeline classification for worker scheduling.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum PipelineType {
|
||||
Frame,
|
||||
Time,
|
||||
Cross,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user