mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-25 16:03:48 +00:00
16 lines
418 B
Ruby
16 lines
418 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module SidekiqMiddleware
|
|
class ShardAwarenessValidator
|
|
def call(_worker, _job, _queue)
|
|
# Scopes shard-awareness validation to Gitlab-logic since Sidekiq
|
|
# internally uses Sidekiq.redis for job fetching, cron polling, heartbeats, etc
|
|
::Gitlab::SidekiqSharding::Validator.enabled do
|
|
yield
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|