feat: add new features such as database watchdog

This commit is contained in:
DaanSelen
2026-04-21 16:27:04 +02:00
parent 610fdffdb8
commit c4a4fafb52
16 changed files with 428 additions and 158 deletions
+20
View File
@@ -0,0 +1,20 @@
package database
import (
"log"
"log/slog"
"gorm.io/gorm"
)
func watchdog(w string, db *gorm.DB) {
slog.Info("performing the watchdog cycle")
files, err := GetFiles(db)
if err != nil {
slog.Error("failed to retrieve the files indexed from the database", "error", err)
return
}
log.Println(files)
}