fix(tkg): remove tkg_nodes.json file check in is_tkg_done()

- TKG processor writes to database, not file
- Check database + trace directories instead
- Fix infinite loop for completed files
- Related: Phase 0 preparation for dynamic concurrency
This commit is contained in:
Accusys
2026-10-17 18:24:26 +08:00
parent 0361510a05
commit 91f83f781c
+18 -2
View File
@@ -2040,10 +2040,26 @@ impl JobWorker {
.filter_map(|e| e.ok())
.filter(|e| e.file_name().to_string_lossy().starts_with("trace_"))
.count();
return trace_count > 0;
if trace_count == 0 {
tracing::warn!(
"[TKG] Database has {} records but no trace dirs for {}, returning false",
count, uuid
);
return false;
}
tracing::info!(
"[TKG] TKG done for {}: {} nodes in database, {} trace dirs",
uuid, count, trace_count
);
return true;
}
tracing::warn!(
"[TKG] Database has {} records but cannot read trace dir for {}, returning false",
count, uuid
);
false
}