strand per shard for due date cacher
Change-Id: I6e4ba16a3108af9ea462ebfc3ee30e4d65ac54d6 Reviewed-on: https://gerrit.instructure.com/21763 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
d2bbc3e0be
commit
011cd66860
|
@ -6,7 +6,8 @@ class DueDateCacher
|
|||
|
||||
def self.recompute_batch(assignments)
|
||||
new(assignments).send_later_if_production_enqueue_args(:recompute,
|
||||
:strand => "cached_due_date:calculator:batch")
|
||||
:strand => "cached_due_date:calculator:batch:#{Shard.current.id}",
|
||||
:priority => Delayed::LOWER_PRIORITY)
|
||||
end
|
||||
|
||||
# expects all assignments to be on the same shard
|
||||
|
|
|
@ -67,7 +67,8 @@ describe DueDateCacher do
|
|||
|
||||
it "should queue a delayed job on a batch-specific singleton strand in production" do
|
||||
@instance.expects(:send_later_if_production_enqueue_args).
|
||||
with(:recompute, :strand => "cached_due_date:calculator:batch")
|
||||
with(:recompute, :strand => "cached_due_date:calculator:batch:#{Shard.current.id}",
|
||||
:priority => Delayed::LOWER_PRIORITY)
|
||||
DueDateCacher.recompute_batch(@assignments)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue