fmt
This commit is contained in:
parent
1333532d3f
commit
fcd6563887
3 changed files with 5 additions and 10 deletions
|
|
@ -4,9 +4,7 @@
|
|||
//! shape they want (HTTP redirect vs JSON).
|
||||
|
||||
use anyhow::Result;
|
||||
use hive_sh4re::{
|
||||
ApprovalStatus, HelperEvent, MANAGER_AGENT, Message, SYSTEM_SENDER,
|
||||
};
|
||||
use hive_sh4re::{ApprovalStatus, HelperEvent, MANAGER_AGENT, Message, SYSTEM_SENDER};
|
||||
|
||||
use crate::coordinator::Coordinator;
|
||||
use crate::lifecycle;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use std::path::Path;
|
|||
use std::sync::Arc;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use axum::extract::Form;
|
||||
use axum::{
|
||||
Router,
|
||||
extract::{Path as AxumPath, State},
|
||||
|
|
@ -19,7 +20,6 @@ use axum::{
|
|||
},
|
||||
routing::{get, post},
|
||||
};
|
||||
use axum::extract::Form;
|
||||
use hive_sh4re::{Approval, MANAGER_AGENT, Message};
|
||||
use serde::Deserialize;
|
||||
use tokio_stream::wrappers::BroadcastStream;
|
||||
|
|
@ -215,9 +215,7 @@ fn gc_orphans(coord: &Coordinator, approvals: Vec<Approval>) -> Vec<Approval> {
|
|||
if Coordinator::agent_proposed_dir(&a.agent).exists() {
|
||||
true
|
||||
} else {
|
||||
let _ = coord
|
||||
.approvals
|
||||
.mark_failed(a.id, "agent state dir missing");
|
||||
let _ = coord.approvals.mark_failed(a.id, "agent state dir missing");
|
||||
tracing::info!(id = a.id, agent = %a.agent, "auto-failed orphan approval");
|
||||
false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,9 +296,8 @@ fn set_resource_limits(container: &str) -> Result<()> {
|
|||
let dir = format!("/run/systemd/system/container@{container}.service.d");
|
||||
std::fs::create_dir_all(&dir).with_context(|| format!("create {dir}"))?;
|
||||
let path = format!("{dir}/hyperhive-limits.conf");
|
||||
let content = format!(
|
||||
"[Service]\nMemoryMax={DEFAULT_MEMORY_MAX}\nCPUQuota={DEFAULT_CPU_QUOTA}\n",
|
||||
);
|
||||
let content =
|
||||
format!("[Service]\nMemoryMax={DEFAULT_MEMORY_MAX}\nCPUQuota={DEFAULT_CPU_QUOTA}\n",);
|
||||
std::fs::write(&path, content).with_context(|| format!("write {path}"))?;
|
||||
tracing::info!(
|
||||
%path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue