Commit a294a60a authored by nmilojevic1's avatar nmilojevic1

Enable RequestStore for import.rake

parent 262bcdd6
......@@ -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