Commit graph

24 commits

Author SHA1 Message Date
simon lehericey
7ac1288905 pj_service take a dossier collection ! 2022-04-07 12:06:13 +02:00
simon lehericey
51a6145d96 put dossier_pdf apart 2022-04-07 12:06:13 +02:00
simon lehericey
d5241381eb extract pj_path method 2022-04-07 12:06:13 +02:00
simon lehericey
97443e2ff6 inline create_list_from_dossier into caller 2022-04-07 12:06:13 +02:00
simon lehericey
51b71aaa01 always call create_list_from_dossiers 2022-04-07 12:06:13 +02:00
simon lehericey
cf79e340ef remove unused method 2022-04-07 12:06:13 +02:00
simon lehericey
3f7693ae13 style remove blank line 2022-04-07 12:06:13 +02:00
simon lehericey
bd0b88a410 move create_list_of_attachments 2022-04-05 11:55:14 +02:00
Martin
2ed9cccba0 extract download all attachments in dedicated class using async/async-http for better perf 2022-01-04 16:17:03 +01:00
simon lehericey
f0b0e7fd9a Switch to usage of zip unix binary to create archive. Also use a dedicated queue for DelayedJob
use dedicated archives queue

As the used disk space will increase, we want a fined grain control

move zip logic in dedicated method

zip

wip

wip

fix(spec): pass spec in green

tech(improvements): avoid File.delete(folder), favor FileUtils.remove_entry_secure which is safer. Also wrap most of code that open file within blocks so it is cleaned when the block ends. Lastly use  attachement.download to avoid big memory pressure [download in chunk, write in chunk] otherwise big file [124>1GO] are loaded in memory. what if we run multiple jobs/download in parallel ?

fix(spec): try to retry with grace

clean(procedure_archive_service_spec.rb): better retry [avoid to rewrite on open file]

lint(things): everything
2021-12-13 16:37:04 +01:00
kara Diaby
6ef5b5d474 modify downloable file 2021-10-05 15:00:21 +02:00
Christophe Robillard
01f180022b prend en compte uniquement les pj pour estimer la taille d'un dossier 2021-05-04 12:50:12 +02:00
Christophe Robillard
3d04221dab generate pdf export for dossier only on demand 2021-04-29 17:30:38 +02:00
Christophe Robillard
f40d96fbd2 Revert "Revert "Export de tous les dossier d'une démarche""
This reverts commit d9a588b52e.
2021-04-29 17:29:47 +02:00
krichtof
d9a588b52e
Revert "Export de tous les dossier d'une démarche" 2021-04-29 16:07:18 +02:00
Christophe Robillard
fba0d78153 generate pdf export inside pieces_justificatives_service 2021-04-28 11:40:58 +02:00
Christophe Robillard
858bbde2d6 remove dead code 2021-03-16 15:13:17 +01:00
Christophe Robillard
60cc4d3697 add pdf to pjs export 2021-03-16 15:13:17 +01:00
Paul Chavard
a2e87cbb56 Add attestation, justificatifs, operation_logs and bill_signatures to dossier export 2020-12-16 16:34:31 +01:00
clemkeirua
d31b4b6848 ajout d'un test sur le telechargement de zips 2020-07-21 15:45:57 +02:00
clemkeirua
48b96046f1 pad file name with creation date
During zip creation, when 2 files have an identical name it creates a corrupted zip file
Duplicate files can now be downloaded with all the versions, the file names contain a timestamp
2020-07-20 15:33:22 +02:00
clemkeirua
def81f9de8 fix zip download for everybody 2020-07-20 11:14:34 +02:00
clemkeirua
9503a363e5 4378 Ajout des PJ de la messagerie dans le zip des PJs du dossier 2019-11-25 10:36:32 +01:00
clemkeirua
25f81f1d3c download a dossier as zip with all attachments 2019-07-16 09:11:25 +02:00