dawarich/app/jobs/points/raw_data/re_archive_month_job.rb
Eugene Burmakin 4fedac720b Add tests
2025-12-07 01:50:01 +01:00

19 lines
517 B
Ruby

# frozen_string_literal: true
module Points
module RawData
class ReArchiveMonthJob < ApplicationJob
queue_as :archival
def perform(user_id, year, month)
Rails.logger.info("Re-archiving #{user_id}/#{year}/#{month} (retrospective import)")
Points::RawData::Archiver.new.archive_specific_month(user_id, year, month)
rescue StandardError => e
ExceptionReporter.call(e, "Re-archival job failed for #{user_id}/#{year}/#{month}")
raise
end
end
end
end