aboutsummaryrefslogtreecommitdiffstats
path: root/app/workers
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/compliance_control_set_copy_worker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/compliance_control_set_copy_worker.rb b/app/workers/compliance_control_set_copy_worker.rb
index 337b92f4b..b87f5ad8e 100644
--- a/app/workers/compliance_control_set_copy_worker.rb
+++ b/app/workers/compliance_control_set_copy_worker.rb
@@ -1,8 +1,10 @@
class ComplianceControlSetCopyWorker
include Sidekiq::Worker
- def perform(control_set_id, referential_id)
+ def perform(control_set_id, referential_id, parent_type = nil, parent_id = nil)
check_set = ComplianceControlSetCopier.new.copy(control_set_id, referential_id)
+ check_set.update parent_type: parent_type, parent_id: parent_id if parent_type && parent_id
+
begin
Net::HTTP.get(URI("#{Rails.configuration.iev_url}/boiv_iev/referentials/validator/new?id=#{check_set.id}"))
rescue Exception => e