From 7e97b767a5d46c00d994e984338d9bdf1dbc9781 Mon Sep 17 00:00:00 2001 From: ozanarmagan Date: Tue, 20 Jun 2023 01:36:52 +0300 Subject: [PATCH] Fix sleep call in batch indexer --- src/batched_indexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/batched_indexer.cpp b/src/batched_indexer.cpp index 530963ea..ee4f36a7 100644 --- a/src/batched_indexer.cpp +++ b/src/batched_indexer.cpp @@ -123,7 +123,7 @@ std::string BatchedIndexer::get_collection_name(const std::shared_ptr& void BatchedIndexer::run() { // sleep this thread for 5 seconds - sleep(10); + std::this_thread::sleep_for(std::chrono::seconds(5)); LOG(INFO) << "Starting batch indexer with " << num_threads << " threads."; ThreadPool* thread_pool = new ThreadPool(num_threads);