diff options
| author | Stefan Boberg <[email protected]> | 2022-06-03 10:08:22 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2022-06-03 10:08:22 +0200 |
| commit | 91e2573a1fdebc1c3cbbbc5d5f9be3b6f540463b (patch) | |
| tree | 2bf98fe4a1dfa20bace298d0f51b1a2d8b9a7217 /zenserver/config.cpp | |
| parent | Merge branch 'main' into use-catch2 (diff) | |
| parent | move release job to in-house linux agent (diff) | |
| download | zen-91e2573a1fdebc1c3cbbbc5d5f9be3b6f540463b.tar.xz zen-91e2573a1fdebc1c3cbbbc5d5f9be3b6f540463b.zip | |
merge from main
Diffstat (limited to 'zenserver/config.cpp')
| -rw-r--r-- | zenserver/config.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp index be91ae4f8..c534865dc 100644 --- a/zenserver/config.cpp +++ b/zenserver/config.cpp @@ -478,6 +478,13 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions) "Size of gc disk reserve in bytes.", cxxopts::value<uint64_t>(ServerOptions.GcConfig.DiskReserveSize)->default_value("268435456"), ""); + + options.add_option("gc", + "", + "gc-monitor-interval-seconds", + "Garbage collection monitoring interval in seconds.", + cxxopts::value<int32_t>(ServerOptions.GcConfig.MonitorIntervalSeconds)->default_value("30"), + ""); try { auto result = options.parse(argc, argv); @@ -770,8 +777,9 @@ ParseConfigFile(const std::filesystem::path& Path, ZenServerOptions& ServerOptio if (sol::optional<sol::table> GcConfig = lua["gc"]) { - ServerOptions.GcConfig.IntervalSeconds = GcConfig.value().get_or("intervalseconds", 0); - ServerOptions.GcConfig.DiskReserveSize = GcConfig.value().get_or("diskreservesize", uint64_t(1u << 28)); + ServerOptions.GcConfig.MonitorIntervalSeconds = GcConfig.value().get_or("monitorintervalseconds", 30); + ServerOptions.GcConfig.IntervalSeconds = GcConfig.value().get_or("intervalseconds", 0); + ServerOptions.GcConfig.DiskReserveSize = GcConfig.value().get_or("diskreservesize", uint64_t(1u << 28)); if (sol::optional<sol::table> CacheGcConfig = GcConfig.value()["cache"]) { |