|
|
|
@ -877,6 +877,16 @@ class ShixunsController < ApplicationController
|
|
|
|
|
ShixunTagRepertoire.create!(:tag_repertoire_id => str.tag_repertoire_id, :shixun_id => new_shixun.id)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 同步配置
|
|
|
|
|
@shixun.shixun_service_configs.each do |config|
|
|
|
|
|
ShixunServiceConfig.create!(:shixun_id => new_shixun.id,
|
|
|
|
|
:cpu_limit => config.cpu_limit,
|
|
|
|
|
:lower_cpu_limit => config.lower_cpu_limit,
|
|
|
|
|
:memory_limit => config.memory_limit,
|
|
|
|
|
:request_limit => config.request_limit,
|
|
|
|
|
:mirror_repository_id => config.mirror_repository_id)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 同步复制版本库,先fork再修改版本库名
|
|
|
|
|
# eduforge用户作为版本库的创建者
|
|
|
|
|
repository = Repository.new
|
|
|
|
|