Move backend config key
This commit is contained in:
@@ -47,13 +47,13 @@ fn _get_hostname() -> Result<String, Error> {
|
||||
pub async fn get_node_disk_ident(node_config: &NodeConfigCached, dbc: &Client) -> Result<NodeDiskIdent, Error> {
|
||||
let sql = "select nodes.rowid, facility, split, hostname from nodes, facilities where facilities.name = $1 and facility = facilities.rowid and hostname = $2";
|
||||
let rows = dbc
|
||||
.query(sql, &[&node_config.node.backend, &node_config.node.host])
|
||||
.query(sql, &[&node_config.node_config.cluster.backend, &node_config.node.host])
|
||||
.await
|
||||
.errconv()?;
|
||||
if rows.len() != 1 {
|
||||
return Err(Error::with_msg(format!(
|
||||
"get_node can't find unique entry for {} {}",
|
||||
node_config.node.host, node_config.node.backend
|
||||
node_config.node.host, node_config.node_config.cluster.backend
|
||||
)));
|
||||
}
|
||||
let row = &rows[0];
|
||||
@@ -71,13 +71,13 @@ pub async fn get_node_disk_ident_2(
|
||||
) -> Result<NodeDiskIdent, Error> {
|
||||
let sql = "select nodes.rowid, facility, split, hostname from nodes, facilities where facilities.name = $1 and facility = facilities.rowid and hostname = $2";
|
||||
let rows = dbc
|
||||
.query(sql, &[&node_config.node.backend, &node_config.node.host])
|
||||
.query(sql, &[&node_config.node_config.cluster.backend, &node_config.node.host])
|
||||
.await
|
||||
.errconv()?;
|
||||
if rows.len() != 1 {
|
||||
return Err(Error::with_msg(format!(
|
||||
"get_node can't find unique entry for {} {}",
|
||||
node_config.node.host, node_config.node.backend
|
||||
node_config.node.host, node_config.node_config.cluster.backend
|
||||
)));
|
||||
}
|
||||
let row = &rows[0];
|
||||
|
||||
@@ -193,7 +193,7 @@ pub async fn search_channel(
|
||||
) -> Result<ChannelSearchResult, Error> {
|
||||
let database = &node_config.node_config.cluster.database;
|
||||
if let Some(conf) = node_config.node.channel_archiver.as_ref() {
|
||||
search_channel_archeng(query, node_config.node.backend.clone(), conf, database).await
|
||||
search_channel_archeng(query, node_config.node_config.cluster.backend.clone(), conf, database).await
|
||||
} else if let Some(_conf) = node_config.node.archiver_appliance.as_ref() {
|
||||
// TODO
|
||||
err::todoval()
|
||||
|
||||
Reference in New Issue
Block a user