ask effectifs only for 2020/02

This commit is contained in:
Christophe Robillard 2020-06-04 09:18:01 +02:00
parent 5f200ecdfb
commit 6535324ae9

View file

@ -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