Debugging archive generation
debugging exception that occurs sometime when trying to download pj during archive generation
This commit is contained in:
parent
203a150fda
commit
67c0d93eae
1 changed files with 5 additions and 1 deletions
|
@ -27,7 +27,11 @@ class ProcedureArchiveService
|
||||||
Zip::OutputStream.open(tmp_file) do |zipfile|
|
Zip::OutputStream.open(tmp_file) do |zipfile|
|
||||||
files.each do |attachment, pj_filename|
|
files.each do |attachment, pj_filename|
|
||||||
zipfile.put_next_entry("procedure-#{@procedure.id}/#{pj_filename}")
|
zipfile.put_next_entry("procedure-#{@procedure.id}/#{pj_filename}")
|
||||||
|
begin
|
||||||
zipfile.puts(attachment.download)
|
zipfile.puts(attachment.download)
|
||||||
|
rescue
|
||||||
|
raise "Problem while trying to attach #{pj_filename}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue