#pragma once #include #include #include class HouseKeeper { private: mutable std::mutex mutex; std::condition_variable cv; std::atomic quit = false; std::atomic hnsw_repair_interval_s = 1800; HouseKeeper() {} ~HouseKeeper() {} public: static HouseKeeper &get_instance() { static HouseKeeper instance; return instance; } HouseKeeper(HouseKeeper const &) = delete; void operator=(HouseKeeper const &) = delete; void init(uint32_t interval_seconds); void run(); void stop(); };