Class: Renalware::Letters::Printing::BatchPrintJob

Inherits:
ApplicationJob
  • Object
show all
Includes:
UsingTempFolder
Defined in:
app/jobs/renalware/letters/printing/batch_print_job.rb

Instance Method Summary collapse

Methods included from UsingTempFolder

#in_a_temporary_folder

Instance Method Details

#max_attemptsObject



21
22
23
# File 'app/jobs/renalware/letters/printing/batch_print_job.rb', line 21

def max_attempts
  2
end

#perform(batch, user) ⇒ Object

Returns the name of a temp file containing the pdf data



13
14
15
16
17
18
19
# File 'app/jobs/renalware/letters/printing/batch_print_job.rb', line 13

def perform(batch, user)
  in_a_temporary_folder do |dir|
    Dir.chdir(dir) do
      BatchCompilePdfs.call(batch, user)
    end
  end
end