fix: Face processor now saves status and total_faces to face.json

This commit is contained in:
Accusys
2026-09-26 23:06:11 +08:00
parent 8a736a4103
commit 357e585399
99 changed files with 13881 additions and 1065 deletions
+1 -1
View File
@@ -45,4 +45,4 @@ mod tests {
assert!(config.batch_size > 0);
assert!(config.processor_timeout_secs > 0);
}
}
}
+1000 -200
View File
File diff suppressed because it is too large Load Diff
+12
View File
@@ -163,6 +163,18 @@ impl ProcessorPool {
mine < budget
}
/// True if the current worker process currently holds at least one live
/// in-flight handler for the given job (across all processor types).
pub async fn is_job_active(&self, job_id: i32) -> bool {
self.running_per_job
.read()
.await
.get(&job_id)
.copied()
.unwrap_or(0)
> 0
}
/// 根據系統資源計算當前安全的並發上限
pub async fn current_max(&self) -> usize {
let resources = SystemResources::check();
+1 -3
View File
@@ -285,9 +285,7 @@ impl SystemResources {
fn get_ane_info() -> (bool, Option<f64>) {
use std::process::Command;
let output = Command::new("ps")
.args(["aux"])
.output();
let output = Command::new("ps").args(["aux"]).output();
if let Ok(o) = output {
let s = String::from_utf8_lossy(&o.stdout);