Class: DailyCallRecordReportWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/workers/daily_call_record_report_worker.rb

Overview

Scheduled daily (08:00 America/Chicago): email heatwaveteam@warmlyyours.com ONE
consolidated call-record health digest for the prior day — import/transcription
pipeline state plus the recording-gap reconciliation. Replaces the two former
workers (DailyImportSummaryReportWorker @ 07:00 + CallRecordingGapsReportWorker
@ 08:00). See InternalReportsMailer#daily_call_record_report,
Report::DailyImportSummary, Report::CallRecordingGaps, and
config/sidekiq_production_schedule.yml.

Instance Method Summary collapse

Instance Method Details

#performObject

Runs the job.

Returns:

  • (Object)

    the result



18
19
20
21
22
23
24
# File 'app/workers/daily_call_record_report_worker.rb', line 18

def perform
  # The 15-min matcher keeps the call-log<->recording links current; refresh once
  # more over a 2-day window so any recordings imported since the last run are
  # linked before we count gaps.
  CallLogEvent.populate_missing_call_records(start_time: 2.days.ago)
  InternalReportsMailer.daily_call_record_report.deliver_now
end