Debugging archive generation

debugging exception that occurs sometime when trying to download pj during
archive generation
This commit is contained in:
Christophe Robillard 2021-07-29 10:44:32 +02:00
parent 203a150fda
commit 67c0d93eae

View file

@ -27,7 +27,11 @@ class ProcedureArchiveService
Zip::OutputStream.open(tmp_file) do |zipfile|
files.each do |attachment, pj_filename|
zipfile.put_next_entry("procedure-#{@procedure.id}/#{pj_filename}")
zipfile.puts(attachment.download)
begin
zipfile.puts(attachment.download)
rescue
raise "Problem while trying to attach #{pj_filename}"
end
end
end