fix: Face processor now saves status and total_faces to face.json
This commit is contained in:
@@ -45,4 +45,4 @@ mod tests {
|
||||
assert!(config.batch_size > 0);
|
||||
assert!(config.processor_timeout_secs > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1000
-200
File diff suppressed because it is too large
Load Diff
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user