Class: StellarBase::EnqueueSubscribeAccountsJob

Inherits:
ApplicationJob show all
Extended by:
LightService::Organizer
Defined in:
app/jobs/stellar_base/enqueue_subscribe_accounts_job.rb

Instance Method Summary collapse

Instance Method Details

#performObject



6
7
8
9
10
11
12
13
14
# File 'app/jobs/stellar_base/enqueue_subscribe_accounts_job.rb', line 6

def perform
  StellarBase.configuration.subscribe_to_accounts.each do |address|
    AccountSubscription.where(address: address).first_or_create!
  end

  AccountSubscription.find_each do ||
    SubscribeAccountJob.perform_async(.id)
  end
end