class RefreshWalletWorker

Public Class Methods

all_connections() click to toggle source
# File lib/eme/billing/workers/refresh_wallet_worker.rb, line 14
def self.all_connections
  @available_connections
end
get_connection() click to toggle source
# File lib/eme/billing/workers/refresh_wallet_worker.rb, line 6
def self.get_connection
  @available_connections.pop
end
return_connection(conn) click to toggle source
# File lib/eme/billing/workers/refresh_wallet_worker.rb, line 10
def self.return_connection(conn)
  @available_connections.push(conn)
end

Public Instance Methods

perform(master_account_id, currency = "EMP", opts = {}) click to toggle source
# File lib/eme/billing/workers/refresh_wallet_worker.rb, line 18
def perform(master_account_id, currency = "EMP", opts = {})
  conn = RefreshWalletWorker.get_connection
  EME::Billing.reload_wallet(master_account_id, currency, opts, EME::Billing.connection(conn))
  RefreshWalletWorker.return_connection(conn)
end