Add instance info support
This commit is contained in:
parent
54f63a4be2
commit
d29b71bfd9
13 changed files with 181 additions and 16 deletions
15
app/workers/scheduler/update_instance_info_scheduler.rb
Normal file
15
app/workers/scheduler/update_instance_info_scheduler.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Scheduler::UpdateInstanceInfoScheduler
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options retry: 1
|
||||
|
||||
def perform
|
||||
Instance.select(:domain).reorder(nil).find_in_batches do |instances|
|
||||
FetchInstanceInfoWorker.push_bulk(instances) do |instance|
|
||||
[instance.domain]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue