1class EnqueuePetitionStatisticsUpdatesJob < ApplicationJob |
|
2 queue_as :low_priority |
|
4 delegate :disable_daily_update_statistics_job?, to: :Site |
|
|
6 def perform(timestamp) |
7 return if disable_daily_update_statistics_job? |
|
9 Petition.signed_since(timestamp.in_time_zone).find_each do |petition| |
|
10 UpdatePetitionStatisticsJob.perform_later(petition) |
|
11 end |
|
12 end |
|
13end |