worker: materialize legacy child cleanup only when needed

This commit is contained in:
2026-08-07 02:05:43 +09:00
parent 620ecbafcb
commit ee75272917
+3
View File
@@ -113,7 +113,10 @@ impl SpawnedWorkerRegistry {
// Runtime projection is migration input only; the normal Internal registry is never
// materialized into spawned_workers.json.
let legacy_projection_exists = runtime_dir.path().join("spawned_workers.json").exists();
if !persisted_children.is_empty() || legacy_projection_exists {
runtime_dir.write_spawned_workers(&[]).await?;
}
if !persisted_children.is_empty() {
let reclaimed = persisted_children
.iter()