Skip to content

Commit

Permalink
[fix] reduce logging
Browse files Browse the repository at this point in the history
xeroc committed Jun 15, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f1c20de commit ce20971
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions config-example.yml
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ wif: "5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
market_separator: ":"

reserves:
- BTS: 1000
- USD: 10
BTS: 1000
USD: 10

bots:
MakerWall:
10 changes: 5 additions & 5 deletions stakemachine/bot.py
Original file line number Diff line number Diff line change
@@ -18,16 +18,16 @@ class BotProtocol(GrapheneWebsocketProtocol):
def onAccountUpdate(self, data):
""" If the account updates, reload every market
"""
log.debug("onAccountUpdate")
for name in bots:
log.debug("onAccountUpdate: %s" % name)
bots[name].loadMarket(notify=True)
bots[name].store()

def onMarketUpdate(self, data):
""" If a Market updates upgrades, reload every market
"""
log.debug("onMarketUpdate")
for name in bots:
log.debug("onMarketUpdate: %s" % name)
bots[name].loadMarket(notify=True)
bots[name].store()

@@ -36,17 +36,17 @@ def onAssetUpdate(self, data):
connection has successfully registered with the blockchain
database
"""
log.debug("onAssetUpdate")
for name in bots:
log.debug("onAssetUpdate: %s" % name)
bots[name].loadMarket(notify=True)
bots[name].asset_tick()
bots[name].store()

def onBlock(self, data) :
""" Every block let the bots know via ``tick()``
"""
log.debug("onBlock")
for name in bots:
log.debug("onBlock: %s" % name)
bots[name].loadMarket(notify=True)
bots[name].tick()
bots[name].store()
@@ -56,8 +56,8 @@ def onRegisterDatabase(self):
connection has successfully registered with the blockchain
database
"""
log.debug("onRegisterDatabase")
for name in bots:
log.debug("onRegisterDatabase: %s" % name)
bots[name].loadMarket(notify=True)
bots[name].tick()
bots[name].store()
5 changes: 5 additions & 0 deletions stakemachine/strategies/maker.py
Original file line number Diff line number Diff line change
@@ -105,6 +105,11 @@ def tick(self, *args, **kwargs):
self.changeFSM("waiting")
self.refreshMarkets = []

def asset_tick(self, *args, **kwargs):
""" Do nothing
"""
pass

def orderPlaced(seld, *args, **kwargs):
""" Do nothing
"""

0 comments on commit ce20971

Please sign in to comment.