Fix ResumeWorker not scheduling to the correct queue
What does this MR do and why?
Fix ResumeWorker not scheduling to the correct queue
ResumeWorker
execution with an worker name argument will try to
reschedule another ResumeWorker
job with 1s delay.
However, using .perform_in
would route the job to ResumeWorker
's
queue which is the default/catchall queue. Instead, we want to run the
ResumeWorker
in the same queue that the resumed worker is running.
The fix is by using the Sidekiq API Sidekiq::Client.enqueue_to_in
.
References
Noticed this while looking that ResumeWorker
for Search::Elastic::CommitIndexerWorker
sometimes runs in catchall
and elasticsearch
shard https://log.gprd.gitlab.net/app/r/s/Hx1yS
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.