fmt
This commit is contained in:
parent
6e7fd2e897
commit
2a98e3ca87
4 changed files with 21 additions and 6 deletions
|
|
@ -31,8 +31,8 @@ impl Broker {
|
|||
std::fs::create_dir_all(parent)
|
||||
.with_context(|| format!("create db parent {}", parent.display()))?;
|
||||
}
|
||||
let conn = Connection::open(path)
|
||||
.with_context(|| format!("open broker db {}", path.display()))?;
|
||||
let conn =
|
||||
Connection::open(path).with_context(|| format!("open broker db {}", path.display()))?;
|
||||
conn.execute_batch(SCHEMA).context("apply broker schema")?;
|
||||
Ok(Self {
|
||||
conn: Mutex::new(conn),
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ impl Coordinator {
|
|||
std::fs::create_dir_all(&agent_dir)
|
||||
.with_context(|| format!("create agent dir {}", agent_dir.display()))?;
|
||||
let socket_path = Self::socket_path(name);
|
||||
let socket =
|
||||
agent_server::start(name.to_owned(), socket_path, self.broker.clone()).await?;
|
||||
let socket = agent_server::start(name.to_owned(), socket_path, self.broker.clone()).await?;
|
||||
self.agents.lock().unwrap().insert(name.to_owned(), socket);
|
||||
Ok(agent_dir)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue