PERF: Move sentiment analysis to "low" sidekiq queue (#1173)

This commit is contained in:
David Taylor 2025-03-07 14:12:15 +00:00 committed by GitHub
parent 5b63e597d0
commit 1b570fcd01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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