forked from DGNum/colmena
Remove another ugly toJSON hack
This commit is contained in:
parent
111bc9dea7
commit
f9f4dd5f63
1 changed files with 3 additions and 5 deletions
|
@ -219,11 +219,9 @@ impl Hive {
|
|||
|
||||
/// Retrieve deployment info for a single node.
|
||||
pub async fn deployment_info_single(&self, node: &NodeName) -> NixResult<Option<NodeConfig>> {
|
||||
let expr = format!("toJSON (hive.nodes.\"{}\".config.deployment or null)", node.as_str());
|
||||
let s: String = self.nix_instantiate(&expr).eval_with_builders().await?
|
||||
.capture_json().await?;
|
||||
|
||||
Ok(serde_json::from_str(&s).unwrap())
|
||||
let expr = format!("hive.nodes.\"{}\".config.deployment or null", node.as_str());
|
||||
self.nix_instantiate(&expr).eval_with_builders().await?
|
||||
.capture_json().await
|
||||
}
|
||||
|
||||
/// Retrieve deployment info for a list of nodes.
|
||||
|
|
Loading…
Reference in a new issue