aboutsummaryrefslogtreecommitdiff
path: root/zenserver/zenserver.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-12-12 12:04:31 +0100
committerPer Larsson <[email protected]>2021-12-12 12:04:31 +0100
commita40133fe893100631f9bb8cd68fb7c2edbab0759 (patch)
tree80cdcb8af8fad50d1004116671a655ec4495d729 /zenserver/zenserver.cpp
parentAdded size to GcStorage. (diff)
downloadzen-a40133fe893100631f9bb8cd68fb7c2edbab0759.tar.xz
zen-a40133fe893100631f9bb8cd68fb7c2edbab0759.zip
Added support for triggering GC with different params and refactored GC scheduler.
Diffstat (limited to 'zenserver/zenserver.cpp')
-rw-r--r--zenserver/zenserver.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index c4cc22140..e14f93f5b 100644
--- a/zenserver/zenserver.cpp
+++ b/zenserver/zenserver.cpp
@@ -195,21 +195,6 @@ public:
.HttpServerClass = std::string(ServerOptions.HttpServerClass),
.BuildVersion = std::string(BUILD_VERSION)});
- m_AdminService.RegisterGcHandler({.Trigger =
- [this]() {
- CbObjectWriter Writer;
- const bool Started = m_GcScheduler.ScheduleNow();
- Writer << "Status"sv << (Started ? "Started"sv : "Running"sv);
- return Writer.Save();
- },
- .Status =
- [this]() {
- CbObjectWriter Writer;
- const GcSchedulerStatus Status = m_GcScheduler.Status();
- Writer << "Status"sv << (GcSchedulerStatus::kIdle == Status ? "Idle"sv : "Running"sv);
- return Writer.Save();
- }});
-
// Ok so now we're configured, let's kick things off
m_Http = zen::CreateHttpServer(ServerOptions.HttpServerClass);
@@ -540,7 +525,7 @@ private:
zen::RefPtr<zen::ProjectStore> m_ProjectStore;
std::unique_ptr<zen::HttpProjectService> m_HttpProjectService;
std::unique_ptr<zen::HttpStructuredCacheService> m_StructuredCacheService;
- zen::HttpAdminService m_AdminService;
+ zen::HttpAdminService m_AdminService{m_GcScheduler};
zen::HttpHealthService m_HealthService;
zen::Mesh m_ZenMesh{m_IoContext};
std::unique_ptr<zen::HttpFunctionService> m_HttpFunctionService;