mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
Merge pull request #101 from internetee/story/113066359-optimization
Story/113066359 optimization
This commit is contained in:
commit
30697a3b6d
11 changed files with 92 additions and 73 deletions
|
@ -8,17 +8,17 @@ namespace :whois do
|
|||
|
||||
print "\n-----> Update domains whois_records"
|
||||
Domain.find_in_batches.each do |group|
|
||||
UpdateWhoisRecordJob.enqueue group.map(&:id), 'domain'
|
||||
UpdateWhoisRecordJob.enqueue group.map(&:name), 'domain'
|
||||
end
|
||||
|
||||
print "\n-----> Update blocked domains whois_records"
|
||||
BlockedDomain.find_in_batches.each do |group|
|
||||
UpdateWhoisRecordJob.enqueue group.map(&:id), 'blocked'
|
||||
UpdateWhoisRecordJob.enqueue group.map(&:name), 'blocked'
|
||||
end
|
||||
|
||||
print "\n-----> Update reserved domains whois_records"
|
||||
ReservedDomain.find_in_batches.each do |group|
|
||||
UpdateWhoisRecordJob.enqueue group.map(&:id), 'reserved'
|
||||
UpdateWhoisRecordJob.enqueue group.map(&:name), 'reserved'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace :zonefile do
|
|||
exclude_filter := '%.%.' || i_origin;
|
||||
END IF;
|
||||
|
||||
SELECT ROUND(extract(epoch from now() at time zone 'utc')) INTO serial_num;
|
||||
SELECT (extract(epoch from now() at time zone 'utc'))::int INTO serial_num;
|
||||
|
||||
-- zonefile header
|
||||
SELECT concat(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue