mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-23 08:04:20 +01:00
summary: set thread loglevel to just warn
using level error caused the testframework to fail on non-essential price or availability thread log messages. likely caused by the test runner not being able to query the bitstamp API.
This commit is contained in:
committed by
Christian Decker
parent
14ad827fb8
commit
01b075117f
@@ -79,7 +79,7 @@ class PeerThread(threading.Thread):
|
||||
peerstate[pid]['connected'] = False
|
||||
peerstate[pid]['availability'] = 0.0 * alpha + peerstate[pid]['availability'] * beta
|
||||
except Exception as ex:
|
||||
plugin.log("[PeerThread] " + str(ex), 'error')
|
||||
plugin.log("[PeerThread] " + str(ex), 'warn')
|
||||
time.sleep(interval)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ class PriceThread(threading.Thread):
|
||||
r = requests.get('https://www.bitstamp.net/api/v2/ticker/BTC{}'.format(plugin.currency))
|
||||
plugin.fiat_per_btc = float(r.json()['last'])
|
||||
except Exception as ex:
|
||||
plugin.log("[PriceThread] " + str(ex), 'error')
|
||||
plugin.log("[PriceThread] " + str(ex), 'warn')
|
||||
# Six hours is more than often enough for polling
|
||||
time.sleep(6*3600)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user