aboutsummaryrefslogtreecommitdiffstats
path: root/app/workers
diff options
context:
space:
mode:
authorTeddy Wing2017-10-30 17:42:40 +0100
committerTeddy Wing2017-10-30 17:48:58 +0100
commitf7d48398f5cb2ad714691bd630619b02c8958ac5 (patch)
tree2091fbe3afe406ab0139f909574075a3fcc1c91d /app/workers
parent17dcf8fe67972f6287fdac40a4477ef8b63ae1b9 (diff)
downloadchouette-core-f7d48398f5cb2ad714691bd630619b02c8958ac5.tar.bz2
ComplianceControlSetCopyWorker: Pass ComplianceCheckSet ID to Java
Previously I had been passing the `ComplianceControlSet` ID to the Java API. The API actually expects the ID of the `ComplianceCheckSet`. In order to get this ID, have the `ComplianceControlSetCopier` return the `ComplianceCheckSet` that it creates, and use that to pass the the ID to the Java API. Refs #4782
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/compliance_control_set_copy_worker.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/compliance_control_set_copy_worker.rb b/app/workers/compliance_control_set_copy_worker.rb
index 92ec5b903..d18bb0c88 100644
--- a/app/workers/compliance_control_set_copy_worker.rb
+++ b/app/workers/compliance_control_set_copy_worker.rb
@@ -2,10 +2,10 @@ class ComplianceControlSetCopyWorker
include Sidekiq::Worker
def perform(control_set_id, referential_id)
- ComplianceControlSetCopier.new.copy(control_set_id, referential_id)
+ check_set = ComplianceControlSetCopier.new.copy(control_set_id, referential_id)
begin
- Net::HTTP.get(URI("#{Rails.configuration.iev_url}/boiv_iev/referentials/validator/new?id=#{control_set_id}"))
+ Net::HTTP.get(URI("#{Rails.configuration.iev_url}/boiv_iev/referentials/validator/new?id=#{check_set.id}"))
rescue Exception => e
logger.error "IEV server error : #{e.message}"
logger.error e.backtrace.inspect