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
|
|
@ -111,7 +111,7 @@ pub async fn ensure_root_agent(coord: &Arc<Coordinator>) -> Result<()> {
|
|||
// (no applied flake on disk) we must rebuild — otherwise it's
|
||||
// running whatever the host-declarative config was at create
|
||||
// time, with a wrong systemd unit and port.
|
||||
let applied_flake = Coordinator::agent_applied_dir(MANAGER_NAME).join("flake.nix");
|
||||
let applied_flake = crate::paths::applied_dir(MANAGER_NAME).join("flake.nix");
|
||||
if !applied_flake.exists() && current_rev.is_some() {
|
||||
tracing::warn!(
|
||||
"manager container exists but no applied flake — forcing rebuild to migrate"
|
||||
|
|
@ -151,7 +151,7 @@ pub async fn ensure_root_agent(coord: &Arc<Coordinator>) -> Result<()> {
|
|||
tracing::info!("manager container missing — spawning");
|
||||
// lifecycle::spawn creates the runtime dir internally; no manual
|
||||
// ensure_agent_runtime_dir needed here.
|
||||
let runtime = Coordinator::agent_dir(MANAGER_NAME);
|
||||
let runtime = crate::paths::agent_runtime_dir(MANAGER_NAME);
|
||||
let hive = coord.hive_env();
|
||||
let paths = Coordinator::agent_paths(MANAGER_NAME, runtime);
|
||||
lifecycle::spawn(MANAGER_NAME, &hive, &paths).await?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue