feat: trace-level matching, health watcher/worker status, timezone config

This commit is contained in:
Accusys
2026-05-21 01:08:30 +08:00
parent 8ede4be159
commit bebaa743ed
60 changed files with 6110 additions and 1586 deletions
+13 -8
View File
@@ -8,10 +8,10 @@ use tracing::{info, warn};
use momentry_core::core::api_key::{ApiKeyService, ApiKeyType};
use momentry_core::core::chunk::types::{Chunk, ChunkRule, ChunkType};
use momentry_core::core::db::schema;
use momentry_core::core::db::Database;
use momentry_core::core::time::FrameTime;
use momentry_core::ui::progress::{ProcessorType, ProgressState, ProgressUi};
use momentry_core::core::db::schema;
use momentry_core::{
Embedder, OutputDir, PostgresDb, QdrantDb, RedisClient, VectorPayload, VideoRecord, VideoStatus,
};
@@ -1985,7 +1985,8 @@ async fn main() -> Result<()> {
chunk_id: None,
created_at: String::new(),
};
db.store_pre_chunk(&uuid, "asr", serde_json::to_value(&pre_chunk)?).await?;
db.store_pre_chunk(&uuid, "asr", serde_json::to_value(&pre_chunk)?)
.await?;
asr_pre_chunk_ids.push(i as i64);
}
@@ -2009,7 +2010,8 @@ async fn main() -> Result<()> {
chunk_id: None,
created_at: String::new(),
};
db.store_pre_chunk(&uuid, "cut", serde_json::to_value(&pre_chunk)?).await?;
db.store_pre_chunk(&uuid, "cut", serde_json::to_value(&pre_chunk)?)
.await?;
cut_pre_chunk_ids.push(i as i64);
}
@@ -2037,7 +2039,8 @@ async fn main() -> Result<()> {
chunk_id: None,
created_at: String::new(),
};
db.store_pre_chunk(&uuid, "time", serde_json::to_value(&pre_chunk)?).await?;
db.store_pre_chunk(&uuid, "time", serde_json::to_value(&pre_chunk)?)
.await?;
time_pre_chunk_ids.push(time_pre_chunk_ids.len() as i64);
time_start = time_end;
}
@@ -2117,7 +2120,8 @@ async fn main() -> Result<()> {
frame_path: None,
created_at: String::new(),
};
db.store_frame(&uuid, *frame_num as i64, serde_json::to_value(&frame)?).await?;
db.store_frame(&uuid, *frame_num as i64, serde_json::to_value(&frame)?)
.await?;
}
println!("Stored {} frames", all_frames.len());
@@ -2357,8 +2361,7 @@ async fn main() -> Result<()> {
for frame in &context_frames {
if let Some(objects) = frame["yolo_objects"].as_array() {
for obj in objects {
if let Some(class_name) =
obj.get("class_name").and_then(|v| v.as_str())
if let Some(class_name) = obj.get("class_name").and_then(|v| v.as_str())
{
*all_objects.entry(class_name.to_string()).or_insert(0) += 1;
}
@@ -2494,9 +2497,11 @@ async fn main() -> Result<()> {
}
let qdrant_payload = VectorPayload {
uuid: chunk.uuid.clone(),
file_uuid: chunk.uuid.clone(),
chunk_id: chunk.chunk_id.clone(),
chunk_type: "sentence".to_string(),
start_frame: chunk.start_frame,
end_frame: chunk.end_frame,
start_time: chunk.start_time().seconds(),
end_time: chunk.end_time().seconds(),
text: Some(text.to_string()),