feat: add locally syncing and watchdog
This commit is contained in:
+4
-2
@@ -17,6 +17,8 @@ func main() {
|
||||
slog.Info("grabbing environment variables")
|
||||
env := utility.GrabEnvironment()
|
||||
|
||||
// TO DO, allow cmd args parsing
|
||||
|
||||
// checking directories to ensure its expected environment is ready
|
||||
slog.Info("auditing operating environment")
|
||||
if err := utility.EnsureOperation(env.DataDirectory); err != nil {
|
||||
@@ -29,10 +31,10 @@ func main() {
|
||||
slog.Info("kicking off database connection")
|
||||
db, err := database.KickoffDatabase(env.DataDirectory)
|
||||
if err != nil {
|
||||
slog.Error("failed to initiate a database connection")
|
||||
slog.Error("failed to initiate a database connection", "error", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
slog.Info("kicking off database watchdog", "watch_interval", env.WatchInterval)
|
||||
slog.Info("kicking off database watchdog", "watch_interval", env.WatchdogInterval)
|
||||
database.KickoffDatabaseWatchdog(env, db)
|
||||
|
||||
// TO DO make gin log as json
|
||||
|
||||
Reference in New Issue
Block a user