Remove Arc from config structs to make them Serialize
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
use err::Error;
|
||||
use netpod::log::*;
|
||||
use netpod::{Channel, NodeConfig};
|
||||
use std::sync::Arc;
|
||||
use tokio_postgres::NoTls;
|
||||
|
||||
pub async fn channel_exists(channel: &Channel, node_config: Arc<NodeConfig>) -> Result<bool, Error> {
|
||||
pub async fn channel_exists(channel: &Channel, node_config: &NodeConfig) -> Result<bool, Error> {
|
||||
let d = &node_config.cluster.database;
|
||||
let uri = format!("postgresql://{}:{}@{}:{}/{}", d.user, d.pass, d.host, 5432, d.name);
|
||||
let (cl, conn) = tokio_postgres::connect(&uri, NoTls).await?;
|
||||
|
||||
Reference in New Issue
Block a user