summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 15:07:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 15:07:39 +0000
commit862d225ca0d8eb452e56b8fe5a0109aac796e872 (patch)
treeebf0a5d43bd271fadd9004245fb7c7cf0543dcc1 /lib/tasks
parentd10a462fedbd7794a83abdba9b4526600f71de5b (diff)
downloadgitlab-ce-862d225ca0d8eb452e56b8fe5a0109aac796e872.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/import_export/import.rake15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/tasks/gitlab/import_export/import.rake b/lib/tasks/gitlab/import_export/import.rake
index 42b36873519..a88fb88c7ef 100644
--- a/lib/tasks/gitlab/import_export/import.rake
+++ b/lib/tasks/gitlab/import_export/import.rake
@@ -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