批量fork团队人数处理
This commit is contained in:
parent
8f67181b16
commit
ca6bd9a9a6
|
@ -16,7 +16,7 @@ namespace :batch_forked_project do
|
||||||
project = Project.find project_id
|
project = Project.find project_id
|
||||||
next if Project.exists?(user_id: user.id, identifier: project.identifier)
|
next if Project.exists?(user_id: user.id, identifier: project.identifier)
|
||||||
new_project = Projects::ForkService.new(user, project, nil).call
|
new_project = Projects::ForkService.new(user, project, nil).call
|
||||||
random_num = rand(20..25)
|
random_num = rand(2..8)
|
||||||
members = user_logins.sample(random_num)
|
members = user_logins.sample(random_num)
|
||||||
members.each do |m|
|
members.each do |m|
|
||||||
m_user = User.find_by(login: m)
|
m_user = User.find_by(login: m)
|
||||||
|
|
Loading…
Reference in New Issue