1class NotifyCreatorsThatParliamentIsDissolvingJob < ApplicationJob |
|
2 queue_as :high_priority |
|
|
4 def perform |
5 petitions.find_each do |petition| |
|
6 NotifyCreatorThatParliamentIsDissolvingJob.perform_later(petition.creator) |
|
7 end |
|
8 end |
|
10 private
|
|
|
12 def petitions |
13 Petition.open_at_dissolution |
|
14 end |
|
15end |