feat: Phase 1 handover - schema migration, correction mechanism, API fixes
Schema changes: dev.chunks->dev.chunk, remove old_chunk_id/chunk_index Correction: asr-1.json format, generate/apply scripts API: 37/37 endpoints fixed and tested Docs: HANDOVER_V2.0.md for M4
This commit is contained in:
@@ -142,15 +142,21 @@ impl ProcessorPool {
|
||||
.flatten();
|
||||
if let Some(pid) = old_pid {
|
||||
if pid > 0 {
|
||||
warn!("[PID] Killing existing process {} for {}/{}", pid, uuid, processor);
|
||||
unsafe { libc::kill(pid, libc::SIGKILL); }
|
||||
warn!(
|
||||
"[PID] Killing existing process {} for {}/{}",
|
||||
pid, uuid, processor
|
||||
);
|
||||
unsafe {
|
||||
libc::kill(pid, libc::SIGKILL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn start_processor(&self, task: ProcessorTask) -> Result<()> {
|
||||
Self::kill_existing_processor(&*self.redis, &task.job.uuid, task.processor_type.as_str()).await;
|
||||
Self::kill_existing_processor(&*self.redis, &task.job.uuid, task.processor_type.as_str())
|
||||
.await;
|
||||
|
||||
let (cancel_tx, cancel_rx) = mpsc::channel(1);
|
||||
let job_id = task.job.id;
|
||||
@@ -231,15 +237,16 @@ impl ProcessorPool {
|
||||
match result {
|
||||
Ok(output) => {
|
||||
// 驗收 agent 檢查產出內容
|
||||
let verification = crate::verification::verifier::verify_output(
|
||||
&processor_type,
|
||||
&job.uuid,
|
||||
);
|
||||
let verification =
|
||||
crate::verification::verifier::verify_output(&processor_type, &job.uuid);
|
||||
|
||||
if verification.passed {
|
||||
info!(
|
||||
"Processor {} completed and verified for job {} ({} chunks, {} frames)",
|
||||
processor_name, job.uuid, output.chunks_produced, output.frames_processed
|
||||
processor_name,
|
||||
job.uuid,
|
||||
output.chunks_produced,
|
||||
output.frames_processed
|
||||
);
|
||||
|
||||
// 清理暫存備份
|
||||
|
||||
Reference in New Issue
Block a user