Commit 8495e855 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '39110-cache-licence-during-import' into 'master'

Cache license/feature-flag queries during import

Closes #39110

See merge request gitlab-org/gitlab!21751
parents 6e470884 a294a60a
......@@ -64,16 +64,25 @@ class GitlabProjectImport
private
def with_request_store
RequestStore.begin!
yield
ensure
RequestStore.end!
RequestStore.clear!
end
# We want to ensure that all Sidekiq jobs are executed
# 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
Sidekiq::Testing.fake! do
@project = create_project
execute_sidekiq_job
with_request_store do
@project = create_project
execute_sidekiq_job
end
true
end
end
......
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