feat: add working watchdog cycle

This commit is contained in:
DaanSelen
2026-04-22 11:51:57 +02:00
parent bf04e97850
commit 0c287cc917
10 changed files with 166 additions and 82 deletions
+3 -3
View File
@@ -3,7 +3,7 @@ package main
import (
"eden-server/internal/api"
"eden-server/internal/database"
"eden-server/internal/runtime"
"eden-server/internal/utility"
"log/slog"
"os"
)
@@ -15,11 +15,11 @@ func main() {
// grab the environment variables from the runtime environment
slog.Info("grabbing environment variables")
env := runtime.GrabEnvironment()
env := utility.GrabEnvironment()
// checking directories to ensure its expected environment is ready
slog.Info("auditing operating environment")
if err := runtime.EnsureOperation(env.DataDirectory); err != nil {
if err := utility.EnsureOperation(env.DataDirectory); err != nil {
slog.Error("failed to ensure the operating environment", "error", err)
os.Exit(1)
}