debian-mirror-gitlab/lib/gitlab/database/async_ddl_exclusive_lease_guard.rb
2023-04-23 21:23:45 +05:30

18 lines
379 B
Ruby

# frozen_string_literal: true
module Gitlab
module Database
module AsyncDdlExclusiveLeaseGuard
extend ActiveSupport::Concern
include ExclusiveLeaseGuard
def lease_key
@lease_key ||= "gitlab/database/asyncddl/actions/#{database_config_name}"
end
def database_config_name
connection_db_config.name
end
end
end
end