ensure job is queued using the correct shard_id
refs DE-1120 Change-Id: Icbc9e8a30fc3b233b440ec47bd26c4a92ec797fa Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288706 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Alex Slaughter <aslaughter@instructure.com> QA-Review: Aaron Ogata <aogata@instructure.com> Product-Review: Aaron Ogata <aogata@instructure.com>
This commit is contained in:
parent
e075ce961d
commit
b18f6212d2
|
@ -62,9 +62,12 @@ class PeriodicJobs
|
||||||
priority: 40
|
priority: 40
|
||||||
}
|
}
|
||||||
dj_params[:run_at] = compute_run_at(jitter: jitter, local_offset: local_offset)
|
dj_params[:run_at] = compute_run_at(jitter: jitter, local_offset: local_offset)
|
||||||
|
|
||||||
|
current_shard.activate do
|
||||||
klass.delay(**dj_params).__send__(method, *args)
|
klass.delay(**dj_params).__send__(method, *args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def with_each_job_cluster(klass, method, *args, jitter: nil, local_offset: false)
|
def with_each_job_cluster(klass, method, *args, jitter: nil, local_offset: false)
|
||||||
|
|
Loading…
Reference in New Issue