Users: Add config option to control how often last_seen is updated (#88721)

Users: Add config option to control how often last_seen is updated

Co-authored-by: Karl Persson <kalle.persson92@gmail.com>
This commit is contained in:
Rajguru
2024-06-24 16:54:56 +02:00
committed by GitHub
co-authored by Karl Persson
parent 399651b9ad
commit 1b2f110664
6 changed files with 30 additions and 3 deletions
+1
View File
@@ -221,6 +221,7 @@ func TestUpdateLastSeenAt(t *testing.T) {
tracer: tracing.InitializeTracerForTest(),
}
userService.cfg = setting.NewCfg()
userService.cfg.UserLastSeenUpdateInterval = 5 * time.Minute
t.Run("update last seen at", func(t *testing.T) {
userStore.ExpectedSignedInUser = &user.SignedInUser{UserID: 1, OrgID: 1, Email: "email", Login: "login", Name: "name", LastSeenAt: time.Now().Add(-20 * time.Minute)}