21 lines
315 B
Go
21 lines
315 B
Go
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)
|
|
}
|