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
91c55996
Commit
91c55996
authored
Nov 15, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent activity_service writing in secondary geo node's database
parent
fe55de83
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
1 deletion
+13
-1
app/services/users/activity_service.rb
app/services/users/activity_service.rb
+1
-1
changelogs/unreleased-ee/.gitkeep
changelogs/unreleased-ee/.gitkeep
+0
-0
changelogs/unreleased-ee/1243-fix-cloning-from-geo-secondary.yml
...ogs/unreleased-ee/1243-fix-cloning-from-geo-secondary.yml
+4
-0
spec/services/users/activity_service_spec.rb
spec/services/users/activity_service_spec.rb
+8
-0
No files found.
app/services/users/activity_service.rb
View file @
91c55996
...
...
@@ -14,7 +14,7 @@ module Users
private
def
record_activity
user_activity
.
touch
user_activity
.
touch
unless
Gitlab
::
Geo
.
secondary?
Rails
.
logger
.
debug
(
"Recorded activity:
#{
@activity
}
for User ID:
#{
@author
.
id
}
(username:
#{
@author
.
username
}
"
)
end
...
...
changelogs/unreleased-ee/.gitkeep
0 → 100644
View file @
91c55996
changelogs/unreleased-ee/1243-fix-cloning-from-geo-secondary.yml
0 → 100644
View file @
91c55996
---
title
:
'
Geo:
fix
a
problem
that
prevented
git
cloning
from
secondary
node'
merge_request
:
873
author
:
spec/services/users/activity_service_spec.rb
View file @
91c55996
...
...
@@ -22,5 +22,13 @@ describe Users::ActivityService, services: true do
end
end
end
context
'when in Geo secondary node'
do
before
{
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
).
and_return
(
true
)
}
it
'does not update last_activity_at'
do
expect
{
service
.
execute
}.
not_to
change
{
user
.
reload
.
last_activity_at
}
end
end
end
end
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