Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9fd644f8
Commit
9fd644f8
authored
Aug 07, 2019
by
Imre Farkas
Committed by
Thong Kuah
Aug 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ActiveSession.cleaned_up_lookup_entries to use Redis#pipelined
parent
f5fcb9a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
app/models/active_session.rb
app/models/active_session.rb
+4
-2
No files found.
app/models/active_session.rb
View file @
9fd644f8
...
@@ -136,8 +136,10 @@ class ActiveSession
...
@@ -136,8 +136,10 @@ class ActiveSession
# only the single key entries are automatically expired by redis, the
# only the single key entries are automatically expired by redis, the
# lookup entries in the set need to be removed manually.
# lookup entries in the set need to be removed manually.
session_ids_and_entries
=
session_ids
.
zip
(
entries
)
session_ids_and_entries
=
session_ids
.
zip
(
entries
)
session_ids_and_entries
.
reject
{
|
_session_id
,
entry
|
entry
}.
each
do
|
session_id
,
_entry
|
redis
.
pipelined
do
redis
.
srem
(
lookup_key_name
(
user
.
id
),
session_id
)
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
end
entries
.
compact
entries
.
compact
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment