Commit 8aa29a5d authored by Robert Speicher's avatar Robert Speicher

Merge branch 'limit-mr-seedfu' into 'master'

Limit the number of merge requests per project to avoid long seeds in development environment

This step was taking a long time because seed_fu creates N / 2 merge requests for each repo, where N is the number of branches for that repo. At the time of this writing, there are 234 branches on the gitlab-ce repo, leading to 117 merge requests.

See merge request !4032
parents 585f5cfa b9672d4b
Gitlab::Seeder.quiet do
# Limit the number of merge requests per project to avoid long seeds
MAX_NUM_MERGE_REQUESTS = 10
Project.all.reject(&:empty_repo?).each do |project|
branches = project.repository.branch_names
branches = project.repository.branch_names.sample(MAX_NUM_MERGE_REQUESTS * 2)
branches.each do |branch_name|
break if branches.size < 2
......
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