fix: use unix seconds in db cleanup

This commit is contained in:
Stavros
2025-11-15 11:45:19 +02:00
parent f4411af0a5
commit 6d663bb1e8
3 changed files with 5 additions and 5 deletions

View File

@@ -375,7 +375,7 @@ func (app *BootstrapApp) dbCleanup(db *gorm.DB) {
for ; true; <-ticker.C {
log.Debug().Msg("Cleaning up old database sessions")
_, err := gorm.G[model.Session](db).Where("expiry < ?", time.Now().UnixMilli()).Delete(ctx)
_, err := gorm.G[model.Session](db).Where("expiry < ?", time.Now().Unix()).Delete(ctx)
if err != nil {
log.Error().Err(err).Msg("Failed to cleanup old sessions")
}