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:
@@ -2041,9 +2041,25 @@ impl JobWorker {
|
|||||||
.filter(|e| e.file_name().to_string_lossy().starts_with("trace_"))
|
.filter(|e| e.file_name().to_string_lossy().starts_with("trace_"))
|
||||||
.count();
|
.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
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user