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



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

def max_attempts
  2
end

#perform(batch, user) ⇒ Object

Returns the name of a temp file containing the pdf data



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

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