debian-mirror-gitlab/lib/tasks/gitlab/exclusive_lease.rake

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

12 lines
427 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
2018-05-09 12:01:36 +05:30
namespace :gitlab do
namespace :exclusive_lease do
2020-03-13 15:44:24 +05:30
desc 'GitLab | Exclusive Lease | Clear existing exclusive leases for specified scope (default: *)'
2018-05-09 12:01:36 +05:30
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