diff options
| author | Dan Engelbrecht <[email protected]> | 2023-10-20 11:02:26 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-20 11:02:26 +0200 |
| commit | 57f054be2f4f68d0d52631838655a45855c33655 (patch) | |
| tree | 4a768d8eee548c1c4c002388e48da3d62850dc02 /src/zenserver/projectstore/projectstore.cpp | |
| parent | Add --skip-delete option to gc command (#484) (diff) | |
| download | zen-57f054be2f4f68d0d52631838655a45855c33655.tar.xz zen-57f054be2f4f68d0d52631838655a45855c33655.zip | |
clean up GcContributor and GcStorage to be pure interfaces (#485)
Diffstat (limited to 'src/zenserver/projectstore/projectstore.cpp')
| -rw-r--r-- | src/zenserver/projectstore/projectstore.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index 0010f09f5..430d5f693 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -1664,9 +1664,8 @@ ProjectStore::Project::TouchOplog(std::string_view Oplog) const ////////////////////////////////////////////////////////////////////////// ProjectStore::ProjectStore(CidStore& Store, std::filesystem::path BasePath, GcManager& Gc, JobQueue& JobQueue) -: GcStorage(Gc) -, GcContributor(Gc) -, m_Log(logging::Get("project")) +: m_Log(logging::Get("project")) +, m_Gc(Gc) , m_CidStore(Store) , m_JobQueue(JobQueue) , m_ProjectBasePath(BasePath) @@ -1674,11 +1673,15 @@ ProjectStore::ProjectStore(CidStore& Store, std::filesystem::path BasePath, GcMa { ZEN_INFO("initializing project store at '{}'", m_ProjectBasePath); // m_Log.set_level(spdlog::level::debug); + m_Gc.AddGcContributor(this); + m_Gc.AddGcStorage(this); } ProjectStore::~ProjectStore() { ZEN_INFO("closing project store at '{}'", m_ProjectBasePath); + m_Gc.RemoveGcStorage(this); + m_Gc.RemoveGcContributor(this); } std::filesystem::path |