mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Output rake task results
This commit is contained in:
parent
5e7ad95092
commit
cd633d0a4b
2 changed files with 8 additions and 3 deletions
|
@ -9,7 +9,10 @@ module Concerns::Domain::Discardable
|
|||
DomainStatus::SERVER_DELETE_PROHIBITED,
|
||||
DomainStatus::DELETE_CANDIDATE)
|
||||
|
||||
domains.map(&:discard)
|
||||
domains.each do |domain|
|
||||
domain.discard
|
||||
yield domain if block_given?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
namespace :domain do
|
||||
desc 'Discard domains'
|
||||
task discard: :environment do
|
||||
Domain.discard_domains
|
||||
Domain.discard_domains do |domain|
|
||||
puts "#{domain} is discarded"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue