debian-mirror-gitlab/lib/gitlab/database/indexing_exclusive_lease_guard.rb
2023-03-17 16:20:25 +05:30

18 lines
397 B
Ruby

# frozen_string_literal: true
module Gitlab
module Database
module IndexingExclusiveLeaseGuard
extend ActiveSupport::Concern
include ExclusiveLeaseGuard
def lease_key
@lease_key ||= "gitlab/database/indexing/actions/#{database_config_name}"
end
def database_config_name
Gitlab::Database.db_config_name(connection)
end
end
end
end