From f32bc171e487b7c87fee28b80d9a411a7d45aa79 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Sun, 22 Sep 2024 10:59:47 -0700 Subject: [PATCH] disable debug logging (issue not fully resolved) File/Dir permission issue is still unresolved, so anyone working on troubleshooting will need to manually re-enable logging when needed. https://github.com/ncbo/bioportal-project/issues/323 --- lib/ontologies_linked_data/models/ontology_submission.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ontologies_linked_data/models/ontology_submission.rb b/lib/ontologies_linked_data/models/ontology_submission.rb index 31a341a4..53b4b0a6 100644 --- a/lib/ontologies_linked_data/models/ontology_submission.rb +++ b/lib/ontologies_linked_data/models/ontology_submission.rb @@ -135,14 +135,15 @@ def self.copy_file_repository(acronym, submissionId, src, filename = nil) path_to_repo = File.join([LinkedData.settings.repository_folder, acronym.to_s, submissionId.to_s]) name = filename || File.basename(File.new(src).path) # THIS LOGGER IS JUST FOR DEBUG - remove after NCBO-795 is closed - logger = Logger.new(Dir.pwd + "/create_permissions.log") + # https://github.com/ncbo/bioportal-project/issues/323 + # logger = Logger.new(Dir.pwd + "/logs/create_permissions.log") if not Dir.exist? path_to_repo FileUtils.mkdir_p path_to_repo - logger.debug("Dir created #{path_to_repo} | #{"%o" % File.stat(path_to_repo).mode} | umask: #{File.umask}") # NCBO-795 + # logger.debug("Dir created #{path_to_repo} | #{"%o" % File.stat(path_to_repo).mode} | umask: #{File.umask}") # NCBO-795 end dst = File.join([path_to_repo, name]) FileUtils.copy(src, dst) - logger.debug("File created #{dst} | #{"%o" % File.stat(dst).mode} | umask: #{File.umask}") # NCBO-795 + # logger.debug("File created #{dst} | #{"%o" % File.stat(dst).mode} | umask: #{File.umask}") # NCBO-795 if not File.exist? dst raise Exception, "Unable to copy #{src} to #{dst}" end