From 6535324ae94a0a31f60cf0e64d74a35a0b6edb2a Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 4 Jun 2020 09:18:01 +0200 Subject: [PATCH] ask effectifs only for 2020/02 --- app/jobs/api_entreprise/effectifs_job.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/jobs/api_entreprise/effectifs_job.rb b/app/jobs/api_entreprise/effectifs_job.rb index e668ef191..4ca19ab8d 100644 --- a/app/jobs/api_entreprise/effectifs_job.rb +++ b/app/jobs/api_entreprise/effectifs_job.rb @@ -1,7 +1,8 @@ class ApiEntreprise::EffectifsJob < ApiEntreprise::Job def perform(etablissement_id, procedure_id) etablissement = Etablissement.find(etablissement_id) - etablissement_params = ApiEntreprise::EffectifsAdapter.new(etablissement.siret, procedure_id, *get_current_valid_month_for_effectif).to_params + # effectifs endpoint currently only works when asking for february 2020 month + etablissement_params = ApiEntreprise::EffectifsAdapter.new(etablissement.siret, procedure_id, "2020", "02").to_params etablissement.update!(etablissement_params) end