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
913093ce
Commit
913093ce
authored
Feb 20, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't cache has external issue tracker on secondaries nodes
parent
cc12bb81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/models/project.rb
app/models/project.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+9
-0
No files found.
app/models/project.rb
View file @
913093ce
...
...
@@ -792,7 +792,7 @@ class Project < ActiveRecord::Base
end
def
cache_has_external_issue_tracker
update_column
(
:has_external_issue_tracker
,
services
.
external_issue_trackers
.
any?
)
update_column
(
:has_external_issue_tracker
,
services
.
external_issue_trackers
.
any?
)
unless
Gitlab
::
Geo
.
secondary?
end
def
has_wiki?
...
...
spec/models/project_spec.rb
View file @
913093ce
...
...
@@ -729,6 +729,15 @@ describe Project, models: true do
project
.
cache_has_external_issue_tracker
end
.
to
change
{
project
.
has_external_issue_tracker
}.
to
(
false
)
end
it
'does not cache data when in a secondary gitlab geo node'
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
)
{
true
}
expect
do
project
.
cache_has_external_issue_tracker
end
.
not_to
change
{
project
.
has_external_issue_tracker
}
end
end
end
describe
'#has_wiki?'
do
...
...
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