Skip to content

Commit

Permalink
feat: fixed tests after multitype queue change
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioDonda committed Dec 12, 2024
1 parent db9643d commit 4439615
Show file tree
Hide file tree
Showing 2 changed files with 555 additions and 531 deletions.
10 changes: 6 additions & 4 deletions src/agent/multitype_queue/include/multitype_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ class MultiTypeQueue : public IMultiTypeQueue

// TODO: doc
/// @brief
const size_t m_maxItems;
size_t m_maxItems;

// TODO: doc
/// @brief
const std::chrono::seconds m_timeout;
const std::chrono::milliseconds m_timeout;

// TODO: doc
/// @brief
Expand All @@ -64,8 +64,7 @@ class MultiTypeQueue : public IMultiTypeQueue
*/
template<typename ConfigGetter>
MultiTypeQueue(const ConfigGetter& getConfigValue)
: m_maxItems(config::agent::QUEUE_DEFAULT_SIZE)
, m_timeout(config::agent::QUEUE_STATUS_REFRESH_TIMER)
: m_timeout(config::agent::QUEUE_STATUS_REFRESH_TIMER)
{
auto dbFolderPath =
getConfigValue.template operator()<std::string>("agent", "path.data").value_or(config::DEFAULT_DATA_PATH);
Expand All @@ -79,6 +78,9 @@ class MultiTypeQueue : public IMultiTypeQueue
m_batchInterval = config::agent::DEFAULT_BATCH_INTERVAL;
}

m_maxItems =
getConfigValue.template operator()<size_t>("agent", "queue_size").value_or(config::agent::QUEUE_DEFAULT_SIZE);

const auto dbFilePath = dbFolderPath + "/" + config::agent::QUEUE_DB_NAME;

try
Expand Down
Loading

0 comments on commit 4439615

Please sign in to comment.