fix(export): when it takes more than 3 hours, exports are purge before being generated. make it possible to have an export that takes more than 3 hours and share this behaviour with kind of same class archive
This commit is contained in:
parent
051e912a91
commit
3e56fdd1d7
19 changed files with 106 additions and 70 deletions
|
@ -5,12 +5,12 @@ module Administrateurs
|
|||
def download
|
||||
export = Export.find_or_create_export(export_format, all_groupe_instructeurs, **export_options)
|
||||
|
||||
if export.ready? && export.old? && force_export?
|
||||
if export.available? && export.old? && force_export?
|
||||
export.destroy
|
||||
export = Export.find_or_create_export(export_format, all_groupe_instructeurs, **export_options)
|
||||
end
|
||||
|
||||
if export.ready?
|
||||
if export.available?
|
||||
respond_to do |format|
|
||||
format.turbo_stream do
|
||||
@dossiers_count = export.count
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue