mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-06 11:10:08 +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
|