mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Allow forcing refresh of the tipbot balance
This commit is contained in:
parent
0ab24f9e86
commit
9f5992c1ea
2 changed files with 4 additions and 4 deletions
|
@ -264,8 +264,8 @@ def ResetGameStats(link,sidentity,game):
|
|||
log_error('Error resetting %s stats for %s: %s' % (game,sidentity,str(e)))
|
||||
raise
|
||||
|
||||
def RetrieveHouseBalance():
|
||||
balance, unlocked_balance = RetrieveTipbotBalance()
|
||||
def RetrieveHouseBalance(force_refresh=False):
|
||||
balance, unlocked_balance = RetrieveTipbotBalance(force_refresh)
|
||||
house_balance = unlocked_balance
|
||||
|
||||
user_balances=0
|
||||
|
|
|
@ -188,9 +188,9 @@ def SendDaemonJSONRPCCommand(method,params):
|
|||
def SendDaemonHTMLCommand(method):
|
||||
return SendHTMLCommand(config.daemon_host,config.daemon_port,method)
|
||||
|
||||
def RetrieveTipbotBalance():
|
||||
def RetrieveTipbotBalance(force_refresh=False):
|
||||
global cached_tipbot_balance, cached_tipbot_unlocked_balance, cached_tipbot_balance_timestamp
|
||||
if cached_tipbot_balance_timestamp and time.time()-cached_tipbot_balance_timestamp < config.tipbot_balance_cache_time:
|
||||
if not force_refresh and cached_tipbot_balance_timestamp and time.time()-cached_tipbot_balance_timestamp < config.tipbot_balance_cache_time:
|
||||
return cached_tipbot_balance, cached_tipbot_unlocked_balance
|
||||
|
||||
j = SendWalletJSONRPCCommand("getbalance",None)
|
||||
|
|
Loading…
Reference in a new issue