|
|
@ -39,15 +39,11 @@ class ExtractFulltextJob < ApplicationJob |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def perform |
|
|
|
def perform |
|
|
|
|
|
|
|
return unless OpenProject::Database.allows_tsv? |
|
|
|
return unless @attachment = find_attachment(@attachment_id) |
|
|
|
return unless @attachment = find_attachment(@attachment_id) |
|
|
|
|
|
|
|
|
|
|
|
init |
|
|
|
init |
|
|
|
|
|
|
|
update |
|
|
|
if OpenProject::Database.allows_tsv? |
|
|
|
|
|
|
|
update |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
attachment.update(fulltext: @text) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
private |
|
|
|
private |
|
|
|