Slow down LndHub auth requests in task

This commit is contained in:
Basti 2022-04-12 15:42:44 +02:00
parent d9970c126a
commit 8773bf5f9e
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72

View File

@ -14,6 +14,7 @@ namespace :lndhub do
data = lndhub.balance(auth_token) data = lndhub.balance(auth_token)
balance = data["BTC"]["AvailableBalance"] rescue nil balance = data["BTC"]["AvailableBalance"] rescue nil
puts "#{user.address}: #{balance}" if balance && balance > 0 puts "#{user.address}: #{balance}" if balance && balance > 0
sleep 0.5
end end
end end
end end