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
+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();