1class NotifyCreatorsThatParliamentIsDissolvingJob < ApplicationJob
 
2  queue_as :high_priority
 
3
  • Complexity 2 » saikuro
4  def perform
 
5    petitions.find_each do |petition|
 
6      NotifyCreatorThatParliamentIsDissolvingJob.perform_later(petition.creator)
 
7    end
 
8  end
 
 9
 
10  private
 
  • UtilityFunction - doesn't depend on instance state (maybe move it to another class?) » reek
  • Complexity 1 » saikuro
12  def petitions
 
13    Petition.open_at_dissolution
 
14  end
 
15end