mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
refactoring
This commit is contained in:
parent
d260eacc1a
commit
8063d538a6
2 changed files with 6 additions and 4 deletions
|
@ -1,9 +1,11 @@
|
|||
class MigrateBeforeForceDeleteStatusesJob < ApplicationJob
|
||||
def perform
|
||||
domains = Domain.where.not(statuses_before_force_delete: nil)
|
||||
domains.each do |domain|
|
||||
domain.force_delete_domain_statuses_history = domain.statuses_before_force_delete
|
||||
domain.save
|
||||
domains.find_in_batches do |domain_batches|
|
||||
domain_batches.each do |domain|
|
||||
domain.force_delete_domain_statuses_history = domain.statuses_before_force_delete
|
||||
domain.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class MigrateStatusesToDomainHistoryJob < ApplicationJob
|
||||
def perform
|
||||
domains = Domain.all.select { |d| !d.locked_by_registrant? }
|
||||
domains = Domain.where(locked_by_registrant_at: nil)
|
||||
domains.each do |domain|
|
||||
domain.admin_store_statuses_history = domain.statuses
|
||||
domain.save
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue