diff --git a/app/controllers/templates_controller.rb b/app/controllers/templates_controller.rb index 53d070285a..dcb5dace04 100644 --- a/app/controllers/templates_controller.rb +++ b/app/controllers/templates_controller.rb @@ -87,7 +87,7 @@ def task_status def populate_template uploaded_file = params[:template_json_file] - dir = Rails.root.join('config', 'default_data', 'source_types') + dir = Seek::Config.append_filestore_path('source_types') if Dir.exist?(dir) `rm #{dir}/*` @@ -146,11 +146,11 @@ def set_status end def lockfile - Rails.root.join('tmp', 'populate_templates.lock') + Rails.root.join(Seek::Config.temporary_filestore_path, 'populate_templates.lock') end def resultfile - Rails.root.join('tmp', 'populate_templates.result') + Rails.root.join(Seek::Config.temporary_filestore_path, 'populate_templates.result') end def running! diff --git a/lib/seek/isa_templates/template_extractor.rb b/lib/seek/isa_templates/template_extractor.rb index b0487a7e24..236b8d5606 100644 --- a/lib/seek/isa_templates/template_extractor.rb +++ b/lib/seek/isa_templates/template_extractor.rb @@ -12,7 +12,7 @@ def self.extract_templates disable_authorization_checks do client = Ebi::OlsClient.new project = Project.find_or_create_by(title: 'Default Project') - directory = Rails.root.join('config', 'default_data', 'source_types') + directory = Seek::Config.append_filestore_path('source_types') directory_files = Dir.exist?(directory) ? Dir.glob("#{directory}/*.json") : [] raise '