Class: BibtexCreateDownloadJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/bibtex_create_download_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(params, download) ⇒ Object



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

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