Commit 25cbf495 authored by TousakaRin's avatar TousakaRin

Remove unnecessary modifications and optimize code style

parent 4962beee
...@@ -158,10 +158,8 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base, ...@@ -158,10 +158,8 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base,
if (mp->http_url) { if (mp->http_url) {
os << " @" << *mp->http_url; os << " @" << *mp->http_url;
} }
if (NULL != mp->status && if (mp->status && mp->status->max_concurrency() > 0) {
mp->status->max_concurrency() > 0) { os << " max_concurrency=" << mp->status->max_concurrency();
os << " current_max_concurrency="
<< mp->status->max_concurrency();
} }
} }
os << "</h4>\n"; os << "</h4>\n";
...@@ -172,10 +170,8 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base, ...@@ -172,10 +170,8 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base,
if (mp->http_url) { if (mp->http_url) {
os << " @" << *mp->http_url; os << " @" << *mp->http_url;
} }
if (NULL != mp->status && if (mp->status && mp->status->max_concurrency() > 0) {
mp->status->max_concurrency() > 0) { os << " max_concurrency=" << mp->status->max_concurrency();
os << " max_concurrency="
<< mp->status->max_concurrency();
} }
} }
os << '\n'; os << '\n';
......
...@@ -222,8 +222,8 @@ void ProcessMongoRequest(InputMessageBase* msg_base) { ...@@ -222,8 +222,8 @@ void ProcessMongoRequest(InputMessageBase* msg_base) {
if (!ServerPrivateAccessor(server).AddConcurrency(&(mongo_done->cntl))) { if (!ServerPrivateAccessor(server).AddConcurrency(&(mongo_done->cntl))) {
mongo_done->cntl.SetFailed( mongo_done->cntl.SetFailed(
ELIMIT, "Reached server's max_concurrency=%d", ELIMIT, "Reached server's max_concurrency=%d",
static_cast<int>(server->options().max_concurrency)); static_cast<int>(server->options().max_concurrency));
break; break;
} }
if (FLAGS_usercode_in_pthread && TooManyUserCode()) { if (FLAGS_usercode_in_pthread && TooManyUserCode()) {
......
...@@ -294,8 +294,8 @@ void ProcessNsheadRequest(InputMessageBase* msg_base) { ...@@ -294,8 +294,8 @@ void ProcessNsheadRequest(InputMessageBase* msg_base) {
} }
if (!server_accessor.AddConcurrency(cntl)) { if (!server_accessor.AddConcurrency(cntl)) {
cntl->SetFailed( cntl->SetFailed(
ELIMIT, "Reached server's max_concurrency=%d", ELIMIT, "Reached server's max_concurrency=%d",
static_cast<int>(server->options().max_concurrency)); static_cast<int>(server->options().max_concurrency));
break; break;
} }
if (FLAGS_usercode_in_pthread && TooManyUserCode()) { if (FLAGS_usercode_in_pthread && TooManyUserCode()) {
......
...@@ -388,8 +388,8 @@ void ProcessSofaRequest(InputMessageBase* msg_base) { ...@@ -388,8 +388,8 @@ void ProcessSofaRequest(InputMessageBase* msg_base) {
if (!server_accessor.AddConcurrency(cntl.get())) { if (!server_accessor.AddConcurrency(cntl.get())) {
cntl->SetFailed( cntl->SetFailed(
ELIMIT, "Reached server's max_concurrency=%d", ELIMIT, "Reached server's max_concurrency=%d",
static_cast<int>(server->options().max_concurrency)); static_cast<int>(server->options().max_concurrency));
break; break;
} }
if (FLAGS_usercode_in_pthread && TooManyUserCode()) { if (FLAGS_usercode_in_pthread && TooManyUserCode()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment