Skip to content
Snippets Groups Projects
Commit 14361e5e authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

change receiver health-check to ps

parent 479c4c50
No related branches found
No related tags found
No related merge requests found
......@@ -44,11 +44,13 @@ job "asapo-receivers" {
}
service {
port = "recv"
name = "asapo-receiver"
port = "recv"
check {
name = "asapo-receiver-alive"
type = "tcp"
type = "script"
command = "/bin/ps"
args = ["-fC","receiver"]
interval = "10s"
timeout = "2s"
}
......
......@@ -44,7 +44,7 @@ void Connection::Listen() const noexcept {
}
io__->CloseSocket(socket_fd_, nullptr);
statistics__->Send();
log__->Debug("disconnected from " + address_);
log__->Info("disconnected from " + address_);
}
......
......@@ -54,7 +54,7 @@ void Receiver::ProcessConnections(Error* err) {
}
void Receiver::StartNewConnectionInSeparateThread(int connection_socket_fd, const std::string& address) {
log__->Debug("new connection from " + address);
log__->Info("new connection from " + address);
auto thread = io__->NewThread([connection_socket_fd, address] {
auto connection = std::unique_ptr<Connection>(new Connection(connection_socket_fd, address, GetReceiverConfig()->tag));
connection->Listen();
......
......@@ -102,7 +102,7 @@ class ConnectionTests : public Test {
connection->requests_dispatcher__ = std::unique_ptr<asapo::RequestsDispatcher> {&mock_dispatcher};
EXPECT_CALL(mock_io, CloseSocket_t(_, _));
EXPECT_CALL(mock_statictics, Send_t());
EXPECT_CALL(mock_logger, Debug(HasSubstr("disconnected")));
EXPECT_CALL(mock_logger, Info(HasSubstr("disconnected")));
}
void TearDown() override {
......
......@@ -102,7 +102,7 @@ TEST_F(StartListenerFixture, Ok) {
Return(nullptr)
);
EXPECT_CALL(mock_logger, Debug(HasSubstr("new connection from " + expected_address)));
EXPECT_CALL(mock_logger, Info(HasSubstr("new connection from " + expected_address)));
receiver.Listen(expected_address, &err, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment