Class: CallLogImporterWorker
- Inherits:
-
Object
- Object
- CallLogImporterWorker
- Includes:
- Sidekiq::Job
- Defined in:
- app/workers/call_log_importer_worker.rb
Overview
Sidekiq worker: call log importer.
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/workers/call_log_importer_worker.rb', line 7 def perform # Import new call log but always start at the beginning_of_day res = Phone::CallLogImporter.new.process # This ongoing process will attempt to match newly discovered call records CallLogEvent.populate_missing_call_records(start_time: res.start_time - 1.hour) # Now import queue call logs QueueCallLog.import_new_queue_call_logs # Refresh KPI Call data hour = Time.current.hour ViewCallStatistic.refresh if hour.between?(6, 18) end |