Class: BasicNomenclatureCreateDownloadJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/basic_nomenclature_create_download_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(taxon_name, download) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'app/jobs/basic_nomenclature_create_download_job.rb', line 4

def perform(taxon_name, download)
  begin
    download.source_file_path = ::Export::BasicNomenclature.export(taxon_name.id)
    download.save
  rescue => ex
    ExceptionNotifier.notify_exception(ex,
      data: { taxon_name: taxon_name&.id&.to_s, download: download&.id&.to_s }
    )
    raise
  end
end