diff --git a/deploy/nomad_jobs/asapo-receivers.nmd.in b/deploy/nomad_jobs/asapo-receivers.nmd.in index ef453031a32c7761cfb4f9906d6940f9c870a91f..8d58581771321d3fe839dcc85f417ec0800e0378 100644 --- a/deploy/nomad_jobs/asapo-receivers.nmd.in +++ b/deploy/nomad_jobs/asapo-receivers.nmd.in @@ -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" } diff --git a/receiver/src/connection.cpp b/receiver/src/connection.cpp index d736e52236581d18818a9c1ab72577ecbcfe60c8..0e30d5463fa6e698dba1911270334949a36973b2 100644 --- a/receiver/src/connection.cpp +++ b/receiver/src/connection.cpp @@ -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_); } diff --git a/receiver/src/receiver.cpp b/receiver/src/receiver.cpp index 41be7ea8acc687edc0cb8bd69388719a0243834c..9a94afe45df43c47522ce68d850883976a6ad4ec 100644 --- a/receiver/src/receiver.cpp +++ b/receiver/src/receiver.cpp @@ -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(); diff --git a/receiver/unittests/test_connection.cpp b/receiver/unittests/test_connection.cpp index ea9204dddfc093d68a6fa894fef8dab956471b6f..2ce08a8fca7e6bc8264c4508cb2651cc0302a95a 100644 --- a/receiver/unittests/test_connection.cpp +++ b/receiver/unittests/test_connection.cpp @@ -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 { diff --git a/receiver/unittests/test_receiver.cpp b/receiver/unittests/test_receiver.cpp index 52527fa9e1b28e06b0084be3316a6bd7046c9210..47b42e7464d2b435dacbe7ce253d4596b4ef85a5 100644 --- a/receiver/unittests/test_receiver.cpp +++ b/receiver/unittests/test_receiver.cpp @@ -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);