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