From f8f3fd8c5e0d840a0904e7542c2868bbd21ed6ec Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Wed, 17 May 2023 13:44:40 +0200 Subject: [PATCH] Remove Tika server mode, update version [SCI-8367] --- Gemfile.lock | 2 +- app/models/asset.rb | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3442d9da5..b7b793340 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GIT GIT remote: https://github.com/scinote-eln/yomu - revision: d115f8964f76f2dd461b7af04f7a1f1a5317e725 + revision: 019e7cf6e29c066f0a35100be2031947324f4b2b branch: master specs: yomu (0.2.4) diff --git a/app/models/asset.rb b/app/models/asset.rb index 85e24231d..05b0d44ea 100644 --- a/app/models/asset.rb +++ b/app/models/asset.rb @@ -295,14 +295,8 @@ class Asset < ApplicationRecord mjs_doc.remove_namespaces! text_data = mjs_doc.search("//Field[@name='text']").collect(&:text).join(' ') else - # Start Tika as a server - Yomu.server(:text) - begin - blob.open do |tmp_file| - text_data = Yomu.new(tmp_file.path).text - end - ensure - Yomu.kill_server! + blob.open do |tmp_file| + text_data = Yomu.new(tmp_file.path).text end end