Remove the no-op MAINTENANCE_MODE setting (closes #317)
check / check (push) Successful in 3m25s

MAINTENANCE_MODE did nothing but make the healthcheck JSON report maintenanceMode: true; no request was ever served differently, so an operator who set it expecting requests to be refused got nothing. It is removed from the configuration, the startup configuration log line, the healthcheck JSON, the README and the Settings page, together with the uncalled Server.MaintenanceMode method and the healthcheck's dependency on the configuration. A leftover value in an environment is ignored like any other unknown variable.

Model: opus-5-5
This commit was merged in pull request #430.
This commit is contained in:
2026-10-02 13:27:43 +02:00
parent c87b469dcd
commit 21aafbf928
7 changed files with 10 additions and 48 deletions
-4
View File
@@ -7,7 +7,6 @@ import (
"time"
"go.uber.org/fx"
"sneak.berlin/go/webhooker/internal/config"
"sneak.berlin/go/webhooker/internal/database"
"sneak.berlin/go/webhooker/internal/globals"
"sneak.berlin/go/webhooker/internal/logger"
@@ -18,7 +17,6 @@ type HealthcheckParams struct {
fx.In
Globals *globals.Globals
Config *config.Config
Logger *logger.Logger
Database *database.Database
}
@@ -64,7 +62,6 @@ func (s *Healthcheck) Healthcheck() *Response {
UptimeHuman: s.uptime().String(),
Appname: s.params.Globals.Appname,
Version: s.params.Globals.Version,
Maintenance: s.params.Config.MaintenanceMode,
}
return resp
@@ -78,7 +75,6 @@ type Response struct {
UptimeHuman string `json:"uptimeHuman"`
Version string `json:"version"`
Appname string `json:"appname"`
Maintenance bool `json:"maintenanceMode"`
}
func (s *Healthcheck) uptime() time.Duration {