pub fn disconnect_address(conn: &PgConnection, address: &str) -> Result<(), Error> {
        diesel::update(services::table.filter(services::address.eq(address)))
            .set(services::health_status.eq(HealthStatus::Disconnected)) // HealthStatus::Disconnected.as_str()))
            .execute(conn)?;
        Ok(())
    }
/// Given an address, if a service with that address already exists, create it.
/// Otherwise update it's connection status to healthy.
Given an address, if a service with that address already exists, create it.
Otherwise update it's connection status to healthy.
Given an address if a service with that address already exists create it . Otherwise update it ' s connection status to healthy .
pub fn disconnect_address(conn: &PgConnection, address: &str) -> Result<(), Error> {
        diesel::update(services::table.filter(services::address.eq(address)))
            .set(services::health_status.eq(HealthStatus::Disconnected)) // HealthStatus::Disconnected.as_str()))
            .execute(conn)?;
        Ok(())
    }
pub fn disconnect_address ( conn : & PgConnection , address : & str ) -> Result < ( ) , Error > { diesel :: update ( services :: table . filter ( services :: address . eq ( address ) ) ) . set ( services :: health_status . eq ( HealthStatus :: Disconnected ) ) // HealthStatus::Disconnected.as_str())) . execute ( conn ) ? ; Ok ( ( ) ) }
Given an address, if a service with that address already exists, create it.
Given an address if a service with that address already exists create it .
conn
&PgConnection
address
&str
conn
&PgConnection
address
&str