Initial commit
This commit is contained in:
15
app/jobs/cron/wallet_balances.rb
Normal file
15
app/jobs/cron/wallet_balances.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module Jobs
|
||||
module Cron
|
||||
module WalletBalances
|
||||
def self.process
|
||||
Wallet.active.find_each do |w|
|
||||
w.update!(balance: w.current_balance)
|
||||
rescue StandardError => e
|
||||
report_exception_to_screen(e)
|
||||
next
|
||||
end
|
||||
sleep 60
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user