Commit 8df452d3 authored by Alex Kalderimis's avatar Alex Kalderimis Committed by Alex Kalderimis

Apply 1 suggestion(s) to 1 file(s)

parent 259c7bb1
......@@ -13,6 +13,8 @@ class IssuePlacementWorker
def perform(issue_id, placement = :end)
issue = Issue.find(issue_id)
# here we are placing not just this issue, but it and all issues created since, and up to five-minutes before.
# This is to deal with out-of-order execution of the worker, while preserving creation order.
to_place = Issue
.relative_positioning_query_base(issue)
.where(Issue.arel_table[:created_at].gteq(issue.created_at - 5.minutes))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment