run token cleanup job when grafana starts, then each hour

This commit is contained in:
Marcus Efraimsson
2019-02-06 22:27:08 +01:00
parent 836501186f
commit 1a140ee199
6 changed files with 29 additions and 25 deletions
+6 -6
View File
@@ -233,11 +233,11 @@ type Cfg struct {
EnterpriseLicensePath string
// Auth
LoginCookieName string
LoginMaxInactiveLifetimeDays int
LoginMaxLifetimeDays int
TokenRotationIntervalMinutes int
ExpiredTokensCleanupIntervalDays int
LoginCookieName string
LoginMaxInactiveLifetimeDays int
LoginMaxLifetimeDays int
TokenRotationIntervalMinutes int
ExpiredTokensCleanupIntervalHours int
}
type CommandLineArgs struct {
@@ -673,7 +673,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
if cfg.TokenRotationIntervalMinutes < 2 {
cfg.TokenRotationIntervalMinutes = 2
}
cfg.ExpiredTokensCleanupIntervalDays = auth.Key("expired_tokens_cleanup_interval_days").MustInt(7)
cfg.ExpiredTokensCleanupIntervalHours = auth.Key("expired_tokens_cleanup_interval_hours").MustInt(1)
DisableLoginForm = auth.Key("disable_login_form").MustBool(false)
DisableSignoutMenu = auth.Key("disable_signout_menu").MustBool(false)