You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: auto_grading_job.rb
    path of file: ./repos/coursemology2/app/jobs/course/assessment/submission
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
class Course::Assessment::Submission::AutoGradingJob < ApplicationJob
  include TrackableJob
  include Rails.application.routes.url_helpers

  # The Answer Auto Grading Job needs to be at a higher priority than submission auto grading jobs,
  # because it is fired off by submission auto grading 
    
  def perform_tracked(submission, only_ungraded = false) # rubocop:disable Style/OptionalBooleanParameter
    instance = Course.unscoped { submission.assessment.course.instance }
    ActsAsTenant.with_tenant(instance) do
      Course::Assessment::Submission::AutoGradingService.grade(submission, only_ungraded: only_ungraded)
      redirect_to(edit_course_assessment_submission_path(submission.assessment.course,
                                                         submission.assessment, submission))
    end
  end