mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 07:49:50 +02:00
Cleanup
- Move len sessions to template - Move time conversion inside CleanupExpiredUserSessions
This commit is contained in:
5 files changed
+17
-17
No files matched your search
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user