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/lib/tasks/check_reponame.rake

16 lines
518 B

namespace :myshixun do
task check_reponame: :environment do
# 如果是选择题的则跳过否则reponame 为空的则为异常
myshixuns = Myshixun.where("repo_name is null and created_at > '2019-07-20 00:00:00'")
myshixuns.each do |myshixun|
shixun = myshixun.shixun
challenges = shixun.challenges
# 不是纯选择题的情况
6 years ago
if challenges.select{|challenge| challenge.st.to_i == 0}.size > 0
puts myshixun.games.first.try(:identifier)
end
end
end
end