From 39feca251d19a4ac0349107555d042e8403c612d Mon Sep 17 00:00:00 2001 From: Gangler Fabrice Date: Wed, 15 Jul 2020 15:42:35 +0200 Subject: [PATCH 1/4] allow status page URL to be configured in .env --- config/env.example | 3 +++ config/initializers/urls.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/env.example b/config/env.example index 3bf2397ca..df4655990 100644 --- a/config/env.example +++ b/config/env.example @@ -110,3 +110,6 @@ API_GEO_URL="https://geo.api.gouv.fr" # Modifier le nb de tentatives de relance de job si echec # MAX_ATTEMPTS_JOBS=25 # MAX_ATTEMPTS_API_ENTREPRISE_JOBS=5 + +# Personnalisation d'instance - Page externe "Disponibilité" (status page) +# STATUS_PAGE_URL="" diff --git a/config/initializers/urls.rb b/config/initializers/urls.rb index 7c7fdad65..7a0ccbf8b 100644 --- a/config/initializers/urls.rb +++ b/config/initializers/urls.rb @@ -26,5 +26,5 @@ FAQ_URL = "https://faq.demarches-simplifiees.fr" FAQ_ADMIN_URL = [FAQ_URL, "collection", "1-administrateur-creation-dun-formulaire"].join("/") FAQ_AUTOSAVE_URL = [FAQ_URL, "article", "77-enregistrer-mon-formulaire-pour-le-reprendre-plus-tard?preview=5ec28ca1042863474d1aee00"].join("/") COMMENT_TROUVER_MA_DEMARCHE_URL = [FAQ_URL, "article", "59-comment-trouver-ma-demarche"].join("/") -STATUS_PAGE_URL = "https://status.demarches-simplifiees.fr" +STATUS_PAGE_URL = ENV.fetch("STATUS_PAGE_URL", "https://status.demarches-simplifiees.fr") MATOMO_IFRAME_URL = "https://stats.data.gouv.fr/index.php?module=CoreAdminHome&action=optOut&language=fr&&fontColor=333333&fontSize=16px&fontFamily=Muli" From f7402afa06501e01da4f38e9f99fbd3a12175420 Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Fri, 17 Jul 2020 16:28:48 +0200 Subject: [PATCH 2/4] add env.example.optional --- config/env.example.optional | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config/env.example.optional diff --git a/config/env.example.optional b/config/env.example.optional new file mode 100644 index 000000000..b84c8e819 --- /dev/null +++ b/config/env.example.optional @@ -0,0 +1,3 @@ + +# Variables d'environnement optionnelles + From 62672c02e02a8865c1d05479570f9b484f385ba3 Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Fri, 17 Jul 2020 16:29:21 +0200 Subject: [PATCH 3/4] move STATUS_PAGE_URL into env.example.optional --- config/env.example | 2 -- config/env.example.optional | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/env.example b/config/env.example index df4655990..caefb947a 100644 --- a/config/env.example +++ b/config/env.example @@ -111,5 +111,3 @@ API_GEO_URL="https://geo.api.gouv.fr" # MAX_ATTEMPTS_JOBS=25 # MAX_ATTEMPTS_API_ENTREPRISE_JOBS=5 -# Personnalisation d'instance - Page externe "Disponibilité" (status page) -# STATUS_PAGE_URL="" diff --git a/config/env.example.optional b/config/env.example.optional index b84c8e819..9d6a25159 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -1,3 +1,5 @@ # Variables d'environnement optionnelles +# Personnalisation d'instance - Page externe "Disponibilité" (status page) +# STATUS_PAGE_URL="" From 7d421d471cf6f6882bb8d51c6fba2a3452a173b7 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 23 Jul 2020 09:56:34 +0200 Subject: [PATCH 4/4] Fix revision migration job --- app/jobs/tmp_dossiers_migrate_revisions_job.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/jobs/tmp_dossiers_migrate_revisions_job.rb b/app/jobs/tmp_dossiers_migrate_revisions_job.rb index ad9e55dee..3d5bae95f 100644 --- a/app/jobs/tmp_dossiers_migrate_revisions_job.rb +++ b/app/jobs/tmp_dossiers_migrate_revisions_job.rb @@ -8,8 +8,7 @@ class TmpDossiersMigrateRevisionsJob < ApplicationJob .limit(2000) .find_each do |dossier| if dossier.procedure.present? - dossier.revision = dossier.procedure.active_revision - dossier.save!(validate: false) + dossier.update_column(:revision_id, dossier.procedure.active_revision_id) else except << dossier.id end