diff options
| author | Robert Dober | 2017-11-03 14:58:11 +0100 |
|---|---|---|
| committer | GitHub | 2017-11-03 14:58:11 +0100 |
| commit | 75988d4b5d821266131aec86e33c67eda0c38dcb (patch) | |
| tree | 35e4f1cfcd3589c069717aa7385d90ed7ce431d4 /app/workers | |
| parent | 13553712a18435f16f449a6d0c6a2ade24038797 (diff) | |
| parent | 213c2ac6702718486f10b999948a8e5e3190c749 (diff) | |
| download | chouette-core-75988d4b5d821266131aec86e33c67eda0c38dcb.tar.bz2 | |
Merge pull request #106 from af83/4782-create-worker-for-compliance-check-copy--rb201710301748
4782 create worker for compliance check copy rb201710301748
Diffstat (limited to 'app/workers')
| -rw-r--r-- | app/workers/compliance_control_set_copy_worker.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/workers/compliance_control_set_copy_worker.rb b/app/workers/compliance_control_set_copy_worker.rb new file mode 100644 index 000000000..d18bb0c88 --- /dev/null +++ b/app/workers/compliance_control_set_copy_worker.rb @@ -0,0 +1,14 @@ +class ComplianceControlSetCopyWorker + include Sidekiq::Worker + + def perform(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=#{check_set.id}")) + rescue Exception => e + logger.error "IEV server error : #{e.message}" + logger.error e.backtrace.inspect + end + end +end |
