class HomeworkEndUpdateScoreJob < ApplicationJob
  # 不允许补交的作业截止后，或者补交截止后需要重新计算一次作业成绩
  queue_as :end

  def perform(homework_id)
    homework = HomeworkCommon.find_by(id: homework_id)
    return if homework.blank?
    course = homework.course
    return if course.blank?

    homework.update_homework_work_score

  end
end
