feat: Face JSON v2 schema - add schema_version, bbox x2/y2/center, keep embeddings, update clustering

This commit is contained in:
Accusys
2026-11-02 14:34:02 +08:00
parent 2fca49b120
commit 5d18183d82
566 changed files with 321788 additions and 1662 deletions
+27
View File
@@ -398,6 +398,33 @@ async fn handle_worker(
PostgresDb::run_migrations(db.pool()).await?;
println!("Migrations completed");
// ── Execute Redis Health Check ─────────────────────────────────────────
{
use momentry_core::worker::redis_health_check::RedisHealthChecker;
use momentry_core::core::config::REDIS_KEY_PREFIX;
let redis_url = std::env::var("REDIS_URL")
.unwrap_or_else(|_| "redis://127.0.0.1:6379".to_string());
let health_checker = RedisHealthChecker::new(redis_url, 86400);
println!("Running Redis health check on startup...");
match health_checker.check(REDIS_KEY_PREFIX.as_str()).await {
Ok(report) => {
println!(
"✅ Health check completed: {} orphans cleaned, {} TTLs fixed, {} stale jobs marked",
report.orphan_processors_cleaned,
report.ttls_fixed,
report.stale_jobs_marked
);
}
Err(e) => {
eprintln!("⚠️ Health check failed (continuing anyway): {}", e);
}
}
}
// ──────────────────────────────────────────────────────────────────────
let worker = JobWorker::new(
std::sync::Arc::new(db),
std::sync::Arc::new(redis),