FEATURE: Move embeddings on topic visit to sidekig low queue

This commit is contained in:
Rafael dos Santos Silva 2023-10-23 16:50:50 -03:00
parent a69d158695
commit 9a23eaf99a
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,8 @@
module Jobs
class GenerateEmbeddings < ::Jobs::Base
sidekiq_options queue: "low"
def execute(args)
return unless SiteSetting.ai_embeddings_enabled
return if (topic_id = args[:topic_id]).blank?