Class: VRE::CreateCh31SubmissionsReportJob
- Inherits:
-
Object
- Object
- VRE::CreateCh31SubmissionsReportJob
- Includes:
- Sidekiq::Job
- Defined in:
- app/sidekiq/vre/create_ch31_submissions_report_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(sidekiq_scheduler_args, run_date = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/sidekiq/vre/create_ch31_submissions_report_job.rb', line 8 def perform(sidekiq_scheduler_args, run_date = nil) date = if run_date run_date else epoch = sidekiq_scheduler_args['scheduled_at'] Time.zone.at(epoch).yesterday.strftime('%Y-%m-%d') end submitted_claims = get_claims_created_between(build_range(date)) Ch31SubmissionsReportMailer.build(submitted_claims).deliver_now unless FeatureFlipper.staging_email? end |