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: sample_accessioning_job.rb
    path of file: ./repos/sequencescape/app/jobs
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# Sends sample data to the ENA or EGA in order to generate an accession number
# Records the generated
    
    def perform
      submission = Accession::Submission.new(User.find_by(api_key: configatron.accession_local_key), accessionable)
      submission.post

      # update_accession_number returns true if an accession has been supplied, and the sample has been saved.
      # If this returns false, then we fail the job. This should catch any failure situations
      submission.update_accession_number || raise(JobFailed)
    end