Class: CallRecordImporterWorker

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

Instance Method Summary collapse

Instance Method Details

#perform(file_name = nil) ⇒ Object



6
7
8
9
10
11
12
13
# File 'app/workers/call_record_importer_worker.rb', line 6

def perform(file_name = nil)
  importer = CallRecord::SwitchvoxImporterFile.new
  if file_name
    importer.import_file file_name
  else
    importer.import_new_records # This will queue them individually
  end
end