summaryrefslogtreecommitdiff
path: root/db/fixtures
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-12-07 15:51:37 +0900
committerShinya Maeda <shinya@gitlab.com>2018-12-07 15:51:37 +0900
commit2b9caec16eb1837b729a2e51292a28d31f9ceba0 (patch)
treeecfb8c3ded9383e540cb276bb61216556d5a44eb /db/fixtures
parent9a41378bad735078b64d6ac5e205eed13bf0a98a (diff)
downloadgitlab-ce-2b9caec16eb1837b729a2e51292a28d31f9ceba0.tar.gz
Simplify the change
Diffstat (limited to 'db/fixtures')
-rw-r--r--db/fixtures/development/04_project.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb
index 41e2c4bfb1d..aa8686ac7d8 100644
--- a/db/fixtures/development/04_project.rb
+++ b/db/fixtures/development/04_project.rb
@@ -72,15 +72,14 @@ Sidekiq::Testing.inline! do
end
project = nil
+
Sidekiq::Worker.skipping_transaction_check do
project = Projects::CreateService.new(User.first, params).execute
- end
- # Seed-Fu runs this entire fixture in a transaction, so the `after_commit`
- # hook won't run until after the fixture is loaded. That is too late
- # since the Sidekiq::Testing block has already exited. Force clearing
- # the `after_commit` queue to ensure the job is run now.
- Sidekiq::Worker.skipping_transaction_check do
+ # Seed-Fu runs this entire fixture in a transaction, so the `after_commit`
+ # hook won't run until after the fixture is loaded. That is too late
+ # since the Sidekiq::Testing block has already exited. Force clearing
+ # the `after_commit` queue to ensure the job is run now.
project.send(:_run_after_commit_queue)
project.import_state.send(:_run_after_commit_queue)
end