mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Better loggin for orhpan delete method
This commit is contained in:
parent
8e70bcd6f4
commit
e664d46710
2 changed files with 4 additions and 2 deletions
|
@ -174,7 +174,9 @@ class Contact < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def destroy_orphans
|
||||
find_orphans.destroy_all
|
||||
STDOUT << "#{Time.now.utc} - Destroying orphaned contacts\n"
|
||||
count = find_orphans.destroy_all.count
|
||||
STDOUT << "#{Time.now.utc} - Successfully destroyed #{count} orphaned contacts\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue