mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-07 07:26:20 +08:00
Merge pull request #1479 from okriuchykhin/ok_SCI_2967
Optionally disable Tika background mode through env variable [SCI-2967]
This commit is contained in:
commit
11e0ccc24a
1 changed files with 4 additions and 4 deletions
|
@ -242,12 +242,12 @@ class Asset < ApplicationRecord
|
||||||
file_path = fa.path
|
file_path = fa.path
|
||||||
end
|
end
|
||||||
|
|
||||||
unless Yomu.class_eval('@@server_pid')
|
# Start Tika as a server
|
||||||
Yomu.server(:text, nil)
|
if !ENV['NO_TIKA_SERVER'] && Yomu.class_variable_get(:@@server_pid).nil?
|
||||||
sleep(5)
|
Yomu.server(:text)
|
||||||
end
|
end
|
||||||
y = Yomu.new file_path
|
|
||||||
|
|
||||||
|
y = Yomu.new file_path
|
||||||
text_data = y.text
|
text_data = y.text
|
||||||
|
|
||||||
if asset.asset_text_datum.present?
|
if asset.asset_text_datum.present?
|
||||||
|
|
Loading…
Reference in a new issue