fix: Face processor now saves status and total_faces to face.json
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user