Skip to content
Snippets Groups Projects
Commit c8a5ec86 authored by Bartosz Ziemba's avatar Bartosz Ziemba
Browse files

Update nlpworker.cpp

parent 2ae1efc7
Branches
No related tags found
No related merge requests found
Pipeline #3893 failed
......@@ -27,15 +27,16 @@ void heartbeat_timer(const boost::system::error_code & /*e*/,
In our case however it is causing idle workers to be disconneted from RabbitMQ server.
We can use heartbeat function to send data in order to keep connection alive.
*/
std::cout << "Sending heartbeat\n";
//std::cout << "Sending heartbeat\n";
bool hb_result = connection->heartbeat();
if (hb_result)
{
std::cout << "Heartbeat successful\n";
//std::cout << "Heartbeat successful\n";
}
else
{
std::cout << "Heartbeat failed\n";
std::cout << "Heartbeat failed. Exiting\n";
throw runtime_error("Heartbeat failed. Network error?");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment