Commit 7862b61d authored by Rémy Coutable's avatar Rémy Coutable

Allow Gitaly N+1 calls in the 'gitlab:import_export:import' task

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent f81fa6ab
......@@ -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
execute_sidekiq_job
::Gitlab::GitalyClient.allow_n_plus_1_calls do
yield
end
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment