diff --git a/src/worker/job_worker.rs b/src/worker/job_worker.rs index 7babb65d..7e700ac6 100644 --- a/src/worker/job_worker.rs +++ b/src/worker/job_worker.rs @@ -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 }