1class ArchivePetitionsJob < ApplicationJob |
|
2 queue_as :high_priority |
|
|
4 def perform |
5 Appsignal.without_instrumentation do |
|
6 Petition.find_each do |petition| |
|
7 next if petition.archived? |
|
9 ArchivePetitionJob.perform_later(petition) |
|
10 petition.update_column(:archiving_started_at, Time.current) |
|
11 end |
|
12 end |
|
13 end |
|
14end |