Skip to content

Commit

Permalink
Merge pull request #3110 from betagouv/lucien/jeudi_27
Browse files Browse the repository at this point in the history
rend asynchrone la mise à jour du référencement des antennes pour l'annuaire
  • Loading branch information
clairezed authored Jul 28, 2023
2 parents 515231f + d946264 commit a9b07f2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/models/antenne.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,6 @@ def update_referencement_coverages(*args)
end

def update_antenne_coverage(antenne)
UpdateAntenneCoverage.new(antenne).call
UpdateAntenneCoverage.new(antenne).delay.call
end
end
14 changes: 0 additions & 14 deletions app/services/init_referencement_coverages.rb

This file was deleted.

5 changes: 3 additions & 2 deletions config/initializers/rack_attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ def remote_ip
'137.117.65.40', '20.168.217.16', '172.174.64.146', '13.84.52.121', '20.245.167.249', '138.91.175.192',
'172.177.6.16', '40.86.18.81', '172.177.106.80', '172.177.114.128', '20.171.70.64', '172.177.150.114',
'4.154.90.103', '20.42.13.24', '13.73.50.80', '13.86.66.33', '40.86.18.89', '20.185.158.17', '70.37.166.251',
'138.91.175.198', '20.44.102.46'
'138.91.175.198', '20.44.102.46', '20.42.15.91'
]
remote_ips = [
'172.174.64.0', '13.84.52.0', '20.225.181.0', '20.225.181.119', '20.245.167.0', '138.91.175.0',
'172.177.6.0', '40.86.18.0', '172.177.106.0', '172.177.114.0', '20.171.70.0', '172.177.150.0', '4.154.90.0',
'20.42.13.0', '13.73.50.0', '13.86.66.0', '40.86.18.0', '20.185.158.0', '70.37.166.0', '138.91.175.0', '20.44.102.0'
'20.42.13.0', '13.73.50.0', '13.86.66.0', '40.86.18.0', '20.185.158.0', '70.37.166.0', '138.91.175.0',
'20.44.102.0', '20.42.15.0'
]
(req.post? && req.params['solicitation'].present? && req.params['solicitation']['email'] == 'foo-bar@example.com') ||
ips.include?(req.ip) || remote_ips.include?(req.remote_ip)
Expand Down
8 changes: 0 additions & 8 deletions lib/tasks/init_referencement_coverages.rake

This file was deleted.

0 comments on commit a9b07f2

Please sign in to comment.