DEV: Fix race condition when enqueuing edit wiki-ed notification.

This commit is contained in:
Guo Xiang Tan 2019-05-16 13:47:51 +08:00
parent 636b75fa16
commit a36fe019bb

View File

@ -115,10 +115,12 @@ class PostActionNotifier
end
if user_ids.present?
Jobs.enqueue(:notify_post_revision,
user_ids: user_ids,
post_revision_id: post_revision.id
)
DB.after_commit do
Jobs.enqueue(:notify_post_revision,
user_ids: user_ids,
post_revision_id: post_revision.id
)
end
end
end