Add guard condition for TSVector support in extraction job. Remove non TSV support.

pull/6038/head
Wieland Lindenthal 7 years ago
parent 2d76f72e71
commit 7ad6bc8078
  1. 8
      app/workers/extract_fulltext_job.rb

@ -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

Loading…
Cancel
Save