generate_annual_report_worker.rb 273 B

1234567891011
  1. # frozen_string_literal: true
  2. class GenerateAnnualReportWorker
  3. include Sidekiq::Worker
  4. def perform(account_id, year)
  5. AnnualReport.new(Account.find(account_id), year).generate
  6. rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordNotUnique
  7. true
  8. end
  9. end