Class: Jobs::UpdateTopicHotScores
- Defined in:
- app/jobs/scheduled/update_topic_hot_scores.rb
Constant Summary collapse
- HOT_SCORE_UPDATE_REDIS_KEY =
"hot_score_6_hourly"
Instance Method Summary collapse
Methods inherited from Scheduled
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
9 10 11 12 13 14 |
# File 'app/jobs/scheduled/update_topic_hot_scores.rb', line 9 def execute(args) if SiteSetting..include?("hot") || Discourse.redis.set(HOT_SCORE_UPDATE_REDIS_KEY, 1, ex: 6.hour, nx: true) TopicHotScore.update_scores end end |