Class: PostJobsEnqueuer
- Inherits:
-
Object
- Object
- PostJobsEnqueuer
- Defined in:
- lib/post_jobs_enqueuer.rb
Instance Method Summary collapse
- #enqueue_jobs ⇒ Object
-
#initialize(post, topic, new_topic, opts = {}) ⇒ PostJobsEnqueuer
constructor
A new instance of PostJobsEnqueuer.
Constructor Details
#initialize(post, topic, new_topic, opts = {}) ⇒ PostJobsEnqueuer
Returns a new instance of PostJobsEnqueuer.
4 5 6 7 8 9 |
# File 'lib/post_jobs_enqueuer.rb', line 4 def initialize(post, topic, new_topic, opts = {}) @post = post @topic = topic @new_topic = new_topic @opts = opts end |
Instance Method Details
#enqueue_jobs ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/post_jobs_enqueuer.rb', line 11 def enqueue_jobs # We need to enqueue jobs after the transaction. # Otherwise they might begin before the data has been committed. enqueue_post_alerts unless @opts[:import_mode] feature_topic_users unless @opts[:import_mode] trigger_post_post_process unless skip_after_create? after_post_create after_topic_create make_visible end end |