mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 06:56:23 +02:00
change iterator and added logs
This commit is contained in:
parent
a13ef33628
commit
487c600b11
3 changed files with 10 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,3 +19,4 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/node_modules
|
/node_modules
|
||||||
/import
|
/import
|
||||||
|
ettevotja_rekvisiidid__lihtandmed.csv.zip
|
||||||
|
|
Binary file not shown.
|
@ -187,11 +187,18 @@ namespace :company_status do
|
||||||
end
|
end
|
||||||
|
|
||||||
def soft_delete_company(contact)
|
def soft_delete_company(contact)
|
||||||
contact.domains.reject { |domain| domain.force_delete_scheduled? }.each do |domain|
|
# contact.domains.reject { |domain| domain.force_delete_scheduled? }.each do |domain|
|
||||||
|
# domain.schedule_force_delete(type: :soft)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
|
||||||
|
contact.domains.each do |domain|
|
||||||
|
next if domain.force_delete_scheduled?
|
||||||
|
|
||||||
domain.schedule_force_delete(type: :soft)
|
domain.schedule_force_delete(type: :soft)
|
||||||
|
puts "Soft delete process initiated for company: #{contact.name} with ID: #{contact.id} domain: #{domain.name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Soft delete process initiated for company: #{contact.name} with ID: #{contact.id}"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def write_to_csv_file(csv_file_path:, headers:, attrs:)
|
def write_to_csv_file(csv_file_path:, headers:, attrs:)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue