Class: Jobs::TopicTimerBase
- Defined in:
- app/jobs/regular/topic_timer_base.rb
Direct Known Subclasses
BumpTopic, ClearSlowMode, CloseTopic, DeleteReplies, DeleteTopic, OpenTopic, PublishTopicToCategory
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 18 |
# File 'app/jobs/regular/topic_timer_base.rb', line 5 def execute(args) @args = args topic_timer = TopicTimer.find_by(id: args[:topic_timer_id]) return if !topic_timer&.runnable? topic = topic_timer.topic if topic.blank? topic_timer.destroy! return end execute_timer_action(topic_timer, topic) end |