|
|
@ -158,10 +158,10 @@ class InitializationDataController < ApplicationController
|
|
|
|
shixun_attrs = %i[id name user_id gpid status authentication identifier trainee major_id webssh homepage_show hidden
|
|
|
|
shixun_attrs = %i[id name user_id gpid status authentication identifier trainee major_id webssh homepage_show hidden
|
|
|
|
fork_from can_copy modify_time reset_time publish_time closer_id end_time git_url vnc created_at updated_at
|
|
|
|
fork_from can_copy modify_time reset_time publish_time closer_id end_time git_url vnc created_at updated_at
|
|
|
|
mirror_script_id image_text code_hidden task_pass exec_time test_set_permission sigle_training hide_code
|
|
|
|
mirror_script_id image_text code_hidden task_pass exec_time test_set_permission sigle_training hide_code
|
|
|
|
multi_webssh excute_time repo_name averge_star opening_time forbid_copy pod_life]
|
|
|
|
multi_webssh excute_time repo_name averge_star opening_time forbid_copy pod_life challenges_count]
|
|
|
|
Shixun.bulk_insert(*shixun_attrs) do |worker|
|
|
|
|
Shixun.bulk_insert(*shixun_attrs) do |worker|
|
|
|
|
@shixuns.each do |shixun|
|
|
|
|
@shixuns.each do |shixun|
|
|
|
|
base_attr = shixun.attributes.dup.except("user_id", "challenges_count", "myshixuns_count", "use_scope")
|
|
|
|
base_attr = shixun.attributes.dup.except("user_id", "myshixuns_count", "use_scope")
|
|
|
|
logger.info("#######shixun:#{base_attr}")
|
|
|
|
logger.info("#######shixun:#{base_attr}")
|
|
|
|
worker.add(base_attr.merge(user_id: 1))
|
|
|
|
worker.add(base_attr.merge(user_id: 1))
|
|
|
|
end
|
|
|
|
end
|
|
|
|