Class: RailsPulse::BackfillSummariesJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/rails_pulse/backfill_summaries_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(start_date, end_date, period_types = [ "hour", "day" ]) ⇒ Object



3
4
5
6
7
8
9
10
# File 'app/jobs/rails_pulse/backfill_summaries_job.rb', line 3

def perform(start_date, end_date, period_types = [ "hour", "day" ])
  start_date = start_date.to_datetime
  end_date = end_date.to_datetime

  period_types.each do |period_type|
    backfill_period(period_type, start_date, end_date)
  end
end