Move the offline intervals to the regular config

This commit is contained in:
Owen
2026-10-20 12:15:46 -04:00
parent bcba1e9721
commit ee8724f117
7 changed files with 45 additions and 64 deletions
-31
View File
@@ -18,7 +18,6 @@ import { z } from "zod";
import { colorsSchema } from "@server/lib/colorsSchema";
import { build } from "@server/build";
import { getEnvOrYaml } from "@server/lib/getEnvOrYaml";
import { DEFAULT_OFFLINE_THRESHOLDS } from "@server/lib/offlineThresholds";
const portSchema = z.number().positive().gt(0).lte(65535);
@@ -177,36 +176,6 @@ export const privateConfigSchema = z
.default("http://gerbil:3004")
})
.prefault({}),
// How long a newt site / olm client / remote exit node has to go
// without a ping before the offline checker marks it offline, and how
// often the checkers run.
offline_checker: z
.object({
check_interval_ms: z
.number()
.int()
.positive()
.default(DEFAULT_OFFLINE_THRESHOLDS.checkIntervalMs),
newt_threshold_ms: z
.number()
.int()
.default(DEFAULT_OFFLINE_THRESHOLDS.newtMs),
// wireguard sites don't ping, so they are judged by their
// last bandwidth update instead
newt_wireguard_threshold_ms: z
.number()
.int()
.default(DEFAULT_OFFLINE_THRESHOLDS.newtWireguardMs),
olm_threshold_ms: z
.number()
.int()
.default(DEFAULT_OFFLINE_THRESHOLDS.olmMs),
remote_exit_node_threshold_ms: z
.number()
.int()
.default(DEFAULT_OFFLINE_THRESHOLDS.remoteExitNodeMs)
})
.prefault({}),
flags: z
.object({
enable_redis: z.boolean().optional().default(false),