From 05b6b462b6f9576139cebe22a66f43f6e5321d88 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 11 Jul 2022 14:19:41 +0200 Subject: [PATCH] feat(new_max_duree_conservation): make it configurable for other instances --- app/models/procedure.rb | 2 +- config/env.example.optional | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/procedure.rb b/app/models/procedure.rb index b729c8c1a..96d3b00e3 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -65,7 +65,7 @@ class Procedure < ApplicationRecord default_scope -> { kept } OLD_MAX_DUREE_CONSERVATION = 36 - NEW_MAX_DUREE_CONSERVATION = 12 + NEW_MAX_DUREE_CONSERVATION = ENV.fetch('NEW_MAX_DUREE_CONSERVATION') { 12 }.to_i MIN_WEIGHT = 350000 diff --git a/config/env.example.optional b/config/env.example.optional index e37733a8b..ad14b402a 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -137,3 +137,6 @@ DOLIST_BALANCING_VALUE="50" # Enable vite legacy build (IE11). Legacy build is used in production (except if set to "disabled"). # You might want to enable it in other environements for testing. Build time will be greatly impacted. VITE_LEGACY="" + +# around july 2022, we changed the duree_conservation_dossiers_dans_ds, allow instances to choose their own duration +NEW_MAX_DUREE_CONSERVATION=12