定时任务的执行

video_log
cxt 5 years ago
parent aba1ddc91c
commit 089423543f

@ -14,7 +14,9 @@ class CreateStudentWorkJob < ApplicationJob
student_ids = course.students.pluck(:user_id)
student_ids.each do |user_id|
worker.add same_attrs.merge(user_id: user_id)
unless StudentWork.where(user_id: user_id, homework_common_id: homework.id).exists?
worker.add same_attrs.merge(user_id: user_id)
end
end
end
end

Loading…
Cancel
Save