mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
Story #109699502 - only count records when save succeeds
This commit is contained in:
parent
1d8dcd923a
commit
7d52122554
1 changed files with 1 additions and 2 deletions
|
@ -294,8 +294,7 @@ class Domain < ActiveRecord::Base
|
|||
next unless domain.delete_candidateable?
|
||||
domain.statuses << DomainStatus::DELETE_CANDIDATE
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.start_delete_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
|
||||
domain.save
|
||||
marked += 1
|
||||
domain.save and marked += 1
|
||||
end
|
||||
ensure # the operator should see what was accomplished
|
||||
STDOUT << "#{Time.zone.now.utc} - Finished setting delete_candidate - #{marked} out of #{d.count} successfully set\n" unless Rails.env.test?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue