refactor(#2285): drop coordinator 1:1 path accessors, callers use paths:: directly
This commit is contained in:
parent
187c364feb
commit
cfb84b420a
13 changed files with 38 additions and 56 deletions
|
|
@ -47,7 +47,7 @@ pub(super) fn build_tombstone_views(
|
|||
.into_iter()
|
||||
.filter(|name| !live.contains(name.as_str()))
|
||||
.map(|name| {
|
||||
let root = Coordinator::agent_state_root(&name);
|
||||
let root = crate::paths::agent_state_dir(&name);
|
||||
let state_bytes = dir_size_bytes(&root);
|
||||
let last_seen = std::fs::metadata(&root)
|
||||
.and_then(|m| m.modified())
|
||||
|
|
@ -133,8 +133,8 @@ pub(super) async fn post_purge_tombstone(
|
|||
}
|
||||
let mut errors = Vec::new();
|
||||
for dir in [
|
||||
Coordinator::agent_state_root(&name),
|
||||
Coordinator::agent_applied_dir(&name),
|
||||
crate::paths::agent_state_dir(&name),
|
||||
crate::paths::applied_dir(&name),
|
||||
] {
|
||||
if dir.exists()
|
||||
&& let Err(e) = std::fs::remove_dir_all(&dir)
|
||||
|
|
|
|||
Loading…
Reference in a new issue