Class: ProcessFileJob

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/sidekiq/process_file_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(processing_class, store_dir, filename) ⇒ Object



6
7
8
9
10
11
12
# File 'app/sidekiq/process_file_job.rb', line 6

def perform(processing_class, store_dir, filename)
  uploader = processing_class.constantize.new(store_dir, filename)
  uploader.retrieve_from_store!(filename)
  old_file = uploader.file
  uploader.store!(old_file)
  old_file.delete
end