diff options
| author | Fuwn <[email protected]> | 2026-01-23 17:28:43 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-23 17:28:43 -0800 |
| commit | dd26b219eb322deb511fcdecfdbecb6c963d20d2 (patch) | |
| tree | 40e02860835c96cd4a3711fc48616ad08954586e /cmd | |
| parent | feat: Add config imports for monitor inheritance (diff) | |
| download | kaze-dd26b219eb322deb511fcdecfdbecb6c963d20d2.tar.xz kaze-dd26b219eb322deb511fcdecfdbecb6c963d20d2.zip | |
feat: Add database maintenance with backup/reset modes and triggers
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/kaze/main.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/kaze/main.go b/cmd/kaze/main.go index e010223..ee12ae8 100644 --- a/cmd/kaze/main.go +++ b/cmd/kaze/main.go @@ -68,14 +68,16 @@ func main() { "groups", len(cfg.Groups), "incidents", len(cfg.Incidents)) - // Initialize storage - store, err := storage.New(cfg.Storage.Path, cfg.Storage.HistoryDays) + store, err := storage.NewWithMaintenance(cfg.Storage.Path, cfg.Storage.HistoryDays, cfg.Storage.Maintenance) if err != nil { logger.Error("failed to initialize storage", "error", err) os.Exit(1) } defer store.Close() - logger.Info("initialized storage", "path", cfg.Storage.Path, "history_days", cfg.Storage.HistoryDays) + logger.Info("initialized storage", + "path", cfg.Storage.Path, + "history_days", cfg.Storage.HistoryDays, + "maintenance_mode", store.GetMaintenanceMode()) // Initialize scheduler sched, err := monitor.NewScheduler(cfg, store, logger, *configPath) |