From a3f6cf0493bb595011f98acf95efda33111c537b Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Fri, 3 May 2024 19:16:40 -0700 Subject: [PATCH] reapply PR #153 some of the changes introduced in PR #153 were rolled back by PR #143 merge --- lib/ontologies_linked_data.rb | 11 +++++++---- .../operations/submission_rdf_generator.rb | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/ontologies_linked_data.rb b/lib/ontologies_linked_data.rb index 15c2fee9..19ab8637 100644 --- a/lib/ontologies_linked_data.rb +++ b/lib/ontologies_linked_data.rb @@ -33,13 +33,16 @@ # Require base model require 'ontologies_linked_data/models/base' - - - # Require all models and services project_root = File.dirname(File.absolute_path(__FILE__)) -# Require base services + require 'ontologies_linked_data/services/submission_process/submission_process' +models = Dir.glob("#{project_root}/ontologies_linked_data/concerns/**/*.rb").sort +models.each do |m| + require m +end + + # We need to require deterministic - that is why we have the sort. diff --git a/lib/ontologies_linked_data/services/submission_process/operations/submission_rdf_generator.rb b/lib/ontologies_linked_data/services/submission_process/operations/submission_rdf_generator.rb index d0dbac69..97e1361e 100644 --- a/lib/ontologies_linked_data/services/submission_process/operations/submission_rdf_generator.rb +++ b/lib/ontologies_linked_data/services/submission_process/operations/submission_rdf_generator.rb @@ -295,6 +295,7 @@ def process_rdf(logger, reasoning) zip_dst = @submission.unzip_submission(logger) file_path = zip_dst ? zip_dst.to_s : @submission.uploadFilePath.to_s generate_rdf(logger, file_path, reasoning: reasoning) + @submission.extract_metadata @submission.add_submission_status(status) @submission.save rescue Exception => e