You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#初始化同步educoder的人数,项目数,高校数,实训数,到Trustie平台,只需运行一次
|
|
|
|
|
|
|
|
|
|
class SyncTrustieTask
|
|
|
|
|
|
|
|
|
|
def sync_format
|
|
|
|
|
Rails.logger.info("########________sync_to_trustie_start_________###########")
|
|
|
|
|
|
|
|
|
|
users_count = User.all.size
|
|
|
|
|
projects_count = Project.all.size
|
|
|
|
|
|
|
|
|
|
shixuns_count = Shixun.all.size
|
|
|
|
|
schools_count = School.all.size
|
|
|
|
|
|
|
|
|
|
SyncTrustieJob.perform_later("user", users_count)
|
|
|
|
|
SyncTrustieJob.perform_later("project", projects_count)
|
|
|
|
|
SyncTrustieJob.perform_later("practical_training_project", shixuns_count)
|
|
|
|
|
SyncTrustieJob.perform_later("school", schools_count)
|
|
|
|
|
|
|
|
|
|
Rails.logger.info("########________sync_to_trustie_end_________###########")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|