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/app/tasks/sync_trustie_task.rb

22 lines
722 B

#初始化同步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