mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-09-24 09:43:24 +00:00
Reduce log messages for price queries
This commit is contained in:
parent
7b7817bc4d
commit
3512e2d136
|
@ -37,7 +37,7 @@ def update_price_info():
|
|||
if get_ui_setting("price_ticker"):
|
||||
price = "N/A"
|
||||
try:
|
||||
price_json_string = to_string(subprocess.check_output("torify curl https://api.coindesk.com/v1/bpi/currentprice.json", shell=True))
|
||||
price_json_string = to_string(subprocess.check_output("torify curl --silent https://api.coindesk.com/v1/bpi/currentprice.json", shell=True))
|
||||
data = json.loads(price_json_string)
|
||||
price = data["bpi"]["USD"]["rate_float"]
|
||||
|
||||
|
@ -52,7 +52,7 @@ def update_price_info():
|
|||
d["time"] = now
|
||||
d["price"] = price
|
||||
price_data.append(d)
|
||||
log_message("UPDATE PRICE {}".format(price))
|
||||
#log_message("UPDATE PRICE {}".format(price))
|
||||
|
||||
# only keep 24 hours of updates
|
||||
while len(price_data) > 0:
|
||||
|
|
Loading…
Reference in New Issue
Block a user