debian-mirror-gitlab/lib/gitlab/database/indexing_exclusive_lease_guard.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
397 B
Ruby
Raw Normal View History

2023-03-17 16:20:25 +05:30
# 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