fmt
This commit is contained in:
parent
fef2dee92a
commit
1c6d7f7a8f
4 changed files with 15 additions and 8 deletions
|
|
@ -18,11 +18,7 @@ pub struct AgentSocket {
|
|||
pub handle: JoinHandle<()>,
|
||||
}
|
||||
|
||||
pub fn start(
|
||||
agent: &str,
|
||||
socket_path: &Path,
|
||||
broker: Arc<Broker>,
|
||||
) -> Result<AgentSocket> {
|
||||
pub fn start(agent: &str, socket_path: &Path, broker: Arc<Broker>) -> Result<AgentSocket> {
|
||||
let agent = agent.to_owned();
|
||||
if let Some(parent) = socket_path.parent() {
|
||||
std::fs::create_dir_all(parent)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ impl Approvals {
|
|||
}
|
||||
let conn = Connection::open(path)
|
||||
.with_context(|| format!("open approvals db {}", path.display()))?;
|
||||
conn.execute_batch(SCHEMA).context("apply approvals schema")?;
|
||||
conn.execute_batch(SCHEMA)
|
||||
.context("apply approvals schema")?;
|
||||
Ok(Self {
|
||||
conn: Mutex::new(conn),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -81,7 +81,9 @@ async fn main() -> Result<()> {
|
|||
}
|
||||
Cmd::List => render(client::request(&cli.socket, HostRequest::List).await?),
|
||||
Cmd::Pending => render(client::request(&cli.socket, HostRequest::Pending).await?),
|
||||
Cmd::Approve { id } => render(client::request(&cli.socket, HostRequest::Approve { id }).await?),
|
||||
Cmd::Approve { id } => {
|
||||
render(client::request(&cli.socket, HostRequest::Approve { id }).await?)
|
||||
}
|
||||
Cmd::Deny { id } => render(client::request(&cli.socket, HostRequest::Deny { id }).await?),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue