Class: Jobs::FeatureTopicUsers
- Defined in:
- app/jobs/regular/feature_topic_users.rb
Instance Method Summary collapse
Methods inherited from Base
acquire_cluster_concurrency_lock!, clear_cluster_concurrency_lock!, cluster_concurrency, cluster_concurrency_redis_key, delayed_perform, #error_context, get_cluster_concurrency, #last_db_duration, #log, #perform, #perform_immediately
Instance Method Details
#execute(args) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/jobs/regular/feature_topic_users.rb', line 5 def execute(args) topic_id = args[:topic_id] raise Discourse::InvalidParameters.new(:topic_id) if topic_id.blank? topic = Topic.find_by(id: topic_id) # Topic may be hard deleted due to spam, no point complaining # we would have to look at the topics table id sequence to find cases # where this was called with an invalid id, no point really return if topic.blank? topic.feature_topic_users(args) end |