Skip to content
代码片段 群组 项目
提交 1244df89 编辑于 作者: Lee Tickett's avatar Lee Tickett
浏览文件

Skip transaction check in triage ops seed

One of our seed scripts creates a personal_access_token but
errors out because of issues with hooks inside of transactions.

This MR wraps the seed in Sidekiq::Worker.skipping_transaction_check
to prevent the error.
上级 bbc453f2
No related branches found
No related tags found
无相关合并请求
......@@ -11,29 +11,31 @@ def seed!
puts "Updating settings to allow web hooks to localhost"
ApplicationSetting.current_without_cache.update!(allow_local_requests_from_web_hooks_and_services: true)
Sidekiq::Testing.inline! do
puts "Ensuring required groups"
ensure_group('gitlab-com')
ensure_group('gitlab-com/gl-security/appsec')
ensure_group('gitlab-jh/jh-team')
ensure_group('gitlab-org')
ensure_group('gitlab-org/gitlab-core-team/community-members')
ensure_group('gitlab-org/security')
puts "Ensuring required projects"
ensure_project('gitlab-org/gitlab')
ensure_project('gitlab-org/security/gitlab')
puts "Ensuring required bot user"
ensure_bot_user
puts "Setting up webhooks"
ensure_webhook_for('gitlab-com')
ensure_webhook_for('gitlab-org')
puts "Ensuring work type labels"
ensure_work_type_labels_for('gitlab-com')
ensure_work_type_labels_for('gitlab-org')
Sidekiq::Worker.skipping_transaction_check do
Sidekiq::Testing.inline! do
puts "Ensuring required groups"
ensure_group('gitlab-com')
ensure_group('gitlab-com/gl-security/appsec')
ensure_group('gitlab-jh/jh-team')
ensure_group('gitlab-org')
ensure_group('gitlab-org/gitlab-core-team/community-members')
ensure_group('gitlab-org/security')
puts "Ensuring required projects"
ensure_project('gitlab-org/gitlab')
ensure_project('gitlab-org/security/gitlab')
puts "Ensuring required bot user"
ensure_bot_user
puts "Setting up webhooks"
ensure_webhook_for('gitlab-com')
ensure_webhook_for('gitlab-org')
puts "Ensuring work type labels"
ensure_work_type_labels_for('gitlab-com')
ensure_work_type_labels_for('gitlab-org')
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册