mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
16 lines
No EOL
323 B
Ruby
16 lines
No EOL
323 B
Ruby
class UpdateWhoisRecordJob < Que::Job
|
|
|
|
def run(ids, type)
|
|
klass = case type
|
|
when 'reserved'then ReservedDomain
|
|
when 'blocked' then BlockedDomain
|
|
else Domain
|
|
end
|
|
|
|
ids.each do |id|
|
|
record = klass.find_by(id: id)
|
|
next unless record
|
|
record.update_whois_record
|
|
end
|
|
end
|
|
end |