Commit 9fd644f8 authored by Imre Farkas's avatar Imre Farkas Committed by Thong Kuah

ActiveSession.cleaned_up_lookup_entries to use Redis#pipelined

parent f5fcb9a1
......@@ -136,9 +136,11 @@ class ActiveSession
# only the single key entries are automatically expired by redis, the
# lookup entries in the set need to be removed manually.
session_ids_and_entries = session_ids.zip(entries)
redis.pipelined do
session_ids_and_entries.reject { |_session_id, entry| entry }.each do |session_id, _entry|
redis.srem(lookup_key_name(user.id), session_id)
end
end
entries.compact
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment