summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab/exclusive_lease.rake
blob: bee9782f37399da88cc39e54ab7e8bb2b6cc150b (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

namespace :gitlab do
  namespace :exclusive_lease do
    desc 'GitLab | Exclusive Lease | Clear existing exclusive leases for specified scope (default: *)'
    task :clear, [:scope] => [:environment] do |_, args|
      args[:scope].nil? ? Gitlab::ExclusiveLease.reset_all! : Gitlab::ExclusiveLease.reset_all!(args[:scope])
      puts 'All exclusive lease entries were removed.'
    end
  end
end