Add helper class method in SidekiqSharding::Router for iterating
What does this MR do and why?
This MR adds a with_routed_client
helper method. This avoids devs having to write Gitlab::Redis::Queues.instances.each_value
and Sidekiq::Client.via(...)
for their use of Sidekiq API to be sharding compatible.
gitlab-com/gl-infra/scalability#3430
Add helper class method in SidekiqSharding::Router for iterating
This allows devs to re-use the .with_routed_client
method to iterate
over all shards when using Sidekiq API.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.