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
f32cd056
Commit
f32cd056
authored
Jan 24, 2020
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid calling DetectRepositoryLanguagesWorker on wiki repos
parent
9fc7382d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
app/models/repository.rb
app/models/repository.rb
+2
-0
changelogs/unreleased/fj-avoid-calling-detect-languages-worker-wiki-repos.yml
...d/fj-avoid-calling-detect-languages-worker-wiki-repos.yml
+5
-0
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+19
-1
No files found.
app/models/repository.rb
View file @
f32cd056
...
...
@@ -447,6 +447,8 @@ class Repository
def
after_import
expire_content_cache
return
unless
repo_type
.
project?
# This call is stubbed in tests due to being an expensive operation
# It can be reenabled for specific tests via:
#
...
...
changelogs/unreleased/fj-avoid-calling-detect-languages-worker-wiki-repos.yml
0 → 100644
View file @
f32cd056
---
title
:
Call DetectRepositoryLanguagesWorker only for project repositories
merge_request
:
23696
author
:
type
:
fixed
spec/models/repository_spec.rb
View file @
f32cd056
...
...
@@ -1817,10 +1817,28 @@ describe Repository do
end
describe
'#after_import'
do
subject
{
repository
.
after_import
}
it
'flushes and builds the cache'
do
expect
(
repository
).
to
receive
(
:expire_content_cache
)
repository
.
after_import
subject
end
it
'calls DetectRepositoryLanguagesWorker'
do
expect
(
DetectRepositoryLanguagesWorker
).
to
receive
(
:perform_async
)
subject
end
context
'with a wiki repository'
do
let
(
:repository
)
{
project
.
wiki
.
repository
}
it
'does not call DetectRepositoryLanguagesWorker'
do
expect
(
DetectRepositoryLanguagesWorker
).
not_to
receive
(
:perform_async
)
subject
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