manager: same lifecycle as agents; auto-spawn on hive-c0re start
This commit is contained in:
parent
d81a845dbe
commit
f99ed3fe7a
8 changed files with 168 additions and 65 deletions
|
|
@ -172,11 +172,7 @@ async fn post_rebuild(State(state): State<AppState>, AxumPath(name): AxumPath<St
|
|||
"rebuild: hyperhive_flake has no canonical path; manual rebuild only via `hive-c0re rebuild`",
|
||||
);
|
||||
};
|
||||
let result = if name == lifecycle::MANAGER_NAME {
|
||||
crate::auto_update::rebuild_manager(¤t_rev).await
|
||||
} else {
|
||||
crate::auto_update::rebuild_agent(&state.coord, &name, ¤t_rev).await
|
||||
};
|
||||
let result = crate::auto_update::rebuild_agent(&state.coord, &name, ¤t_rev).await;
|
||||
match result {
|
||||
Ok(()) => Redirect::to("/").into_response(),
|
||||
Err(e) => error_response(&format!("rebuild {name} failed: {e:#}")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue