Skip to content

Commit

Permalink
namespaces shortened.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pcornat committed Feb 21, 2024
1 parent a7e1f62 commit 726d6de
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ArmoniK.SDK.Client/src/ChannelPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,25 @@ std::shared_ptr<grpc::Channel> ChannelPool::AcquireChannel() {

if (channel != nullptr) {
if (ShutdownOnFailure(channel)) {
logger_.log(armonik::api::common::logger::Level::Debug, "Shutdown unhealthy channel");
logger_.log(logger::Level::Debug, "Shutdown unhealthy channel");
} else {
logger_.log(armonik::api::common::logger::Level::Debug, "Acquired already existing channel from pool");
logger_.log(logger::Level::Debug, "Acquired already existing channel from pool");
return channel;
}
}

// TODO Handle TLS
channel = grpc::CreateCustomChannel(
endpoint, credentials_,
armonik::api::common::utils::getChannelArguments(
static_cast<armonik::api::common::utils::Configuration>(properties_.configuration)));
logger_.log(armonik::api::common::logger::Level::Debug, "Created and acquired new channel from pool");
endpoint, credentials_, utils::getChannelArguments(static_cast<utils::Configuration>(properties_.configuration)));
logger_.log(logger::Level::Debug, "Created and acquired new channel from pool");
return channel;
}

void ChannelPool::ReleaseChannel(std::shared_ptr<grpc::Channel> channel) {
if (ShutdownOnFailure(channel)) {
logger_.log(armonik::api::common::logger::Level::Debug, "Shutdown unhealthy channel");
logger_.log(logger::Level::Debug, "Shutdown unhealthy channel");
} else {
logger_.log(armonik::api::common::logger::Level::Debug, "Released channel to pool");
logger_.log(logger::Level::Debug, "Released channel to pool");
std::lock_guard<std::mutex> _(channel_mutex_);
channel_pool_.push(channel);
}
Expand Down

0 comments on commit 726d6de

Please sign in to comment.