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
+4 -4
View File
@@ -423,10 +423,10 @@ func createTestContext(t *testing.T) *testContext {
tokenService := &UserAuthTokenService{
SQLStore: sqlstore,
Cfg: &setting.Cfg{
LoginMaxInactiveLifetimeDays: 7,
LoginMaxLifetimeDays: 30,
TokenRotationIntervalMinutes: 10,
ExpiredTokensCleanupIntervalDays: 1,
LoginMaxInactiveLifetimeDays: 7,
LoginMaxLifetimeDays: 30,
TokenRotationIntervalMinutes: 10,
ExpiredTokensCleanupIntervalHours: 1,
},
log: log.New("test-logger"),
}