feat: update core API, database layer, and worker modules

- Remove unused imports (n8n_search, universal_search, Client, Arc, etc.)
- Update API endpoints for identity, face recognition, search
- Fix postgres_db.rs search_videos parent_uuid column
- Add snapshot API and identity agent API
- Clean up backup files (.bak, .bak2)
This commit is contained in:
Warren
2026-04-30 15:07:02 +08:00
parent 8f2208dd63
commit 2b23d1cfbd
148 changed files with 8553 additions and 48637 deletions

View File

@@ -165,6 +165,42 @@ pub mod cache {
});
}
pub mod snapshot {
use super::*;
pub static SNAPSHOT_DIR_NAME: Lazy<String> = Lazy::new(|| {
env::var("MOMENTRY_SNAPSHOT_DIR_NAME").unwrap_or_else(|_| ".momentry_snapshots".to_string())
});
pub static HOT_THRESHOLD: Lazy<u64> = Lazy::new(|| {
env::var("MOMENTRY_SNAPSHOT_HOT_THRESHOLD")
.unwrap_or_else(|_| "5".to_string())
.parse()
.unwrap_or(5)
});
pub static HOT_TTL_SECS: Lazy<u64> = Lazy::new(|| {
env::var("MOMENTRY_SNAPSHOT_HOT_TTL_SECS")
.unwrap_or_else(|_| "86400".to_string())
.parse()
.unwrap_or(86400)
});
pub static WARM_TTL_SECS: Lazy<u64> = Lazy::new(|| {
env::var("MOMENTRY_SNAPSHOT_WARM_TTL_SECS")
.unwrap_or_else(|_| "604800".to_string())
.parse()
.unwrap_or(604800)
});
pub static GENERATING_TIMEOUT_SECS: Lazy<u64> = Lazy::new(|| {
env::var("MOMENTRY_SNAPSHOT_GENERATING_TIMEOUT")
.unwrap_or_else(|_| "1800".to_string())
.parse()
.unwrap_or(1800)
});
}
pub mod llm {
use super::*;