diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2019-07-12 15:25:12 +0300 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2019-07-22 18:15:57 +0300 |
commit | 313f145b5594ebba7ce4675905061144adb3b44a (patch) | |
tree | 33683a02092d00fd587832dd40f99c5452dd2454 /spec/models/active_session_spec.rb | |
parent | c5fac1034f43d81a17242d8ade2d7eb8741a72e2 (diff) |
Rake task to cleanup expired ActiveSession lookup keys
In some cases ActiveSession.cleanup was not called after authentication,
so for some user ActiveSession lookup keys grew without ever cleaning
up. This Rake task manually iterates over the lookup keys and removes
ones without existing ActiveSession.
Diffstat (limited to 'spec/models/active_session_spec.rb')
-rw-r--r-- | spec/models/active_session_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/active_session_spec.rb b/spec/models/active_session_spec.rb index 09c2878663a..2a689754ee0 100644 --- a/spec/models/active_session_spec.rb +++ b/spec/models/active_session_spec.rb @@ -114,7 +114,7 @@ RSpec.describe ActiveSession, :clean_gitlab_redis_shared_state do redis.sadd("session:lookup:user:gitlab:#{user.id}", session_ids) end - expect(ActiveSession.session_ids_for_user(user)).to eq(session_ids) + expect(ActiveSession.session_ids_for_user(user.id)).to eq(session_ids) end end |