- Move len sessions to template
- Move time conversion inside CleanupExpiredUserSessions
This commit is contained in:
Eric Lesiuta committed 2026-03-25 00:03:21 -04:00
1 parent 0b354c8048
commit 1ea114fa67
5 files changed
+17 -17

No files matched your search

+2 -3
View File
@@ -182,9 +182,8 @@ func registerCleanupUserSessions() {
OlderThan: time.Hour * 24 * 30, // 30 day retention
}, func(ctx context.Context, _ *user_model.User, config Config) error {
olderThanConfig := config.(*OlderThanConfig)
retentionSeconds := int64(olderThanConfig.OlderThan.Seconds())
maxLifetime := setting.SessionConfig.Maxlifetime
return auth_model.CleanupExpiredUserSessions(ctx, retentionSeconds, maxLifetime)
maxLifetime := time.Duration(setting.SessionConfig.Maxlifetime) * time.Second
return auth_model.CleanupExpiredUserSessions(ctx, olderThanConfig.OlderThan, maxLifetime)
})
}