FIX: ensure PostAlerter is always run in sidekiq

This commit is contained in:
Régis Hanol
2018-05-24 17:27:43 +02:00
parent c5dbfe1886
commit 71f66cd679
7 changed files with 60 additions and 59 deletions
+5 -1
View File
@@ -26,7 +26,11 @@ class PostJobsEnqueuer
private
def enqueue_post_alerts
Jobs.enqueue(:post_alert, post_id: @post.id, options: @opts[:post_alert_options])
Jobs.enqueue(:post_alert,
post_id: @post.id,
new_record: true,
options: @opts[:post_alert_options],
)
end
def feature_topic_users
+1 -1
View File
@@ -577,7 +577,7 @@ class PostRevisor
def alert_users
return if @editor.id == Discourse::SYSTEM_USER_ID
PostAlerter.new.after_save_post(@post)
Jobs.enqueue(:post_alert, post_id: @post.id)
end
def publish_changes