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:
Aaron Ogata 2022-04-01 07:34:40 -07:00
parent e075ce961d
commit b18f6212d2
1 changed files with 4 additions and 1 deletions

View File

@ -62,7 +62,10 @@ 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)
klass.delay(**dj_params).__send__(method, *args)
current_shard.activate do
klass.delay(**dj_params).__send__(method, *args)
end
end end
end end
end end