12 std::shared_ptr<broker::interface> broker,
13 std::shared_ptr<logging::log> log,
15 : m_broker(std::move(broker)),
16 m_log(std::move(log)),
18 m_cleanup_thread = std::thread([&]() {
20 while(m_cleanup_queue.pop(
id)) {
21 std::unique_lock l(m_agents_mut);
25 m_retry_thread = std::thread([&]() {
27 while(m_retry_queue.pop(
id)) {
29 std::unique_lock l(m_agents_mut);
30 auto it = m_agents.find(
id);
31 assert(it != m_agents.end());
35 m_log->fatal(
"Error retrying agent");