From 79245a25a38ab556eeb0c36ea25faa48947cc8d8 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 24 Aug 2016 11:05:49 -0400 Subject: [PATCH] Explain the `skip_jobs` parameter --- lib/post_creator.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/post_creator.rb b/lib/post_creator.rb index 19a83c3f10..b03af3d868 100644 --- a/lib/post_creator.rb +++ b/lib/post_creator.rb @@ -32,6 +32,10 @@ class PostCreator # via_email - Mark this post as arriving via email # raw_email - Full text of arriving email (to store) # action_code - Describes a small_action post (optional) + # skip_jobs - Don't enqueue jobs when creation succeeds. This is needed if you + # wrap `PostCreator` in a transaction, as the sidekiq jobs could + # dequeue before the commit finishes. If you do this, be sure to + # call `enqueue_jobs` after the transaction is comitted. # # When replying to a topic: # topic_id - topic we're replying to