refactor
This commit is contained in:
parent
0348492f6c
commit
d66c818c1e
@ -31,22 +31,23 @@ class i_provider;
|
||||
|
||||
class eviction final : public single_thread_service_base {
|
||||
public:
|
||||
eviction(i_provider &provider, const app_config &config, i_file_manager &fm)
|
||||
eviction(i_provider &provider, const app_config &config,
|
||||
i_file_manager &file_mgr)
|
||||
: single_thread_service_base("eviction"),
|
||||
provider_(provider),
|
||||
config_(config),
|
||||
fm_(fm) {}
|
||||
file_mgr_(file_mgr),
|
||||
provider_(provider) {}
|
||||
|
||||
~eviction() override = default;
|
||||
|
||||
private:
|
||||
i_provider &provider_;
|
||||
const app_config &config_;
|
||||
i_file_manager &fm_;
|
||||
i_file_manager &file_mgr_;
|
||||
i_provider &provider_;
|
||||
|
||||
private:
|
||||
[[nodiscard]] auto
|
||||
check_minimum_requirements(const std::string &file_path) -> bool;
|
||||
[[nodiscard]] auto check_minimum_requirements(const std::string &file_path)
|
||||
-> bool;
|
||||
|
||||
[[nodiscard]] auto get_filtered_cached_files() -> std::deque<std::string>;
|
||||
|
||||
|
@ -92,7 +92,7 @@ void eviction::service_function() {
|
||||
continue;
|
||||
}
|
||||
|
||||
fm_.evict_file(fsi.api_path);
|
||||
file_mgr_.evict_file(fsi.api_path);
|
||||
} catch (const std::exception &ex) {
|
||||
utils::error::raise_error(
|
||||
function_name, ex,
|
||||
|
Loading…
x
Reference in New Issue
Block a user