mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 23:42:04 +02:00
111297422-que_jobs
This commit is contained in:
parent
764abdfd89
commit
8ed8a46046
3 changed files with 15 additions and 1 deletions
10
app/jobs/update_whois_record_job.rb
Normal file
10
app/jobs/update_whois_record_job.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
class UpdateWhoisRecordJob < Que::Job
|
||||
def run(ids, type)
|
||||
ids.each do |id|
|
||||
record = WhoisRecord.find_by(id: id)
|
||||
return unless record
|
||||
|
||||
record.save
|
||||
end
|
||||
end
|
||||
end
|
|
@ -106,7 +106,7 @@ class WhoisRecord < ActiveRecord::Base
|
|||
self.json = generated_json
|
||||
self.body = generated_body
|
||||
self.name = json['name']
|
||||
self.registrar_id = domain.registrar_id # for faster registrar updates
|
||||
self.registrar_id = domain.registrar_id if domain # for faster registrar updates
|
||||
end
|
||||
|
||||
def update_whois_server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue