<commit_before>class CreateCivicVcfs < ApplicationJob
  attr_reader :recurring

  after_perform do |job|
    job.reschedule if job.recurring
  end

  def perform(recurring = true)
    @recurring = recurring
    execute
  end

  def execute
    statuses.each do |description, status_list|
      cmd = "civicpy create-vcf --vcf-file-path #{vcf_path(description)}"
      status_list.each do |status|
        cmd += " --include-status #{status}"
      end
      system(cmd)
    end
  end

  def reschedule
    raise 'Implement in subclass!'
  end

  private
  def vcf_path(description)
    raise 'Implement in subclass!'
  end

  def statuses
    {
      'accepted' => ['accepted'],
      'accepted_and_submitted' => ['accepted', 'submitted'],
    }
  end
end<commit_msg>remove recurring plumbing from parent class<commit_after>class CreateCivicVcfs < ApplicationJob
  def perform
    statuses.each do |description, status_list|
      cmd = "civicpy create-vcf --vcf-file-path #{vcf_path(description)}"
      status_list.each do |status|
        cmd += " --include-status #{status}"
      end
      system(cmd)
    end
  end

  private
  def vcf_path(description)
    raise 'Implement in subclass!'
  end

  def statuses
    {
      'accepted' => ['accepted'],
      'accepted_and_submitted' => ['accepted', 'submitted'],
    }
  end
end
{'fraction_non_alphanumeric': 0.10577644411102775, 'fraction_numerical': 0.0, 'mean_word_length': 2.889212827988338, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2241453', 'n_tokens_mistral': 446, 'n_tokens_neox': 432, 'n_words': 109}