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
7862b61d
Commit
7862b61d
authored
Feb 05, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow Gitaly N+1 calls in the 'gitlab:import_export:import' task
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
f81fa6ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
lib/tasks/gitlab/import_export/import.rake
lib/tasks/gitlab/import_export/import.rake
+13
-4
No files found.
lib/tasks/gitlab/import_export/import.rake
View file @
7862b61d
...
...
@@ -76,17 +76,26 @@ class GitlabProjectImport
# synchronously as part of that process.
# This ensures that all expensive operations do not escape
# to general Sidekiq clusters/nodes.
def
run
_isolated_sidekiq_job
def
with
_isolated_sidekiq_job
Sidekiq
::
Testing
.
fake!
do
with_request_store
do
@project
=
create_project
e
xecute_sidekiq_job
::
Gitlab
::
GitalyClient
.
allow_n_plus_1_calls
do
yield
e
nd
end
true
end
end
def
run_isolated_sidekiq_job
with_isolated_sidekiq_job
do
@project
=
create_project
execute_sidekiq_job
end
end
def
create_project
# We are disabling ObjectStorage for `import`
# as it is too slow to handle big archives:
...
...
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