mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
113430903-delete_time_changed
This commit is contained in:
parent
3425deb0fa
commit
a48d2666be
1 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ class DomainCron
|
|||
|
||||
c = 0
|
||||
|
||||
Domain.where('delete_at <= ?', Time.zone.now).each do |x|
|
||||
Domain.where('delete_at <= ?', Time.zone.now.end_of_day.utc).each do |x|
|
||||
next unless x.delete_candidateable?
|
||||
|
||||
x.statuses << DomainStatus::DELETE_CANDIDATE
|
||||
|
@ -106,7 +106,7 @@ class DomainCron
|
|||
end
|
||||
end
|
||||
|
||||
Domain.where('force_delete_at <= ?', Time.zone.now).each do |x|
|
||||
Domain.where('force_delete_at <= ?', Time.zone.now.end_of_day.utc).each do |x|
|
||||
DomainDeleteJob.enqueue(x.id, run_at: rand(((24*60) - (DateTime.now.hour * 60 + DateTime.now.minute))).minutes.from_now)
|
||||
STDOUT << "#{Time.zone.now.utc} DomainCron.destroy_delete_candidates: job added by force delete time ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
||||
c += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue