Skip to content

Commit

Permalink
More resilient market data
Browse files Browse the repository at this point in the history
  • Loading branch information
tedivm committed Nov 4, 2016
1 parent 86db7ee commit b4ab25d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion screeps_etl/memorystats.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ def collectMarketHistory(self):
if item['type'] == 'market.fee':
if 'extendOrder' in item['market']:
item['addAmount'] = item['market']['extendOrder']['addAmount']
else:
elif 'order' in item['market']:
item['orderType'] = item['market']['order']['type']
item['resourceType'] = item['market']['order']['resourceType']
item['price'] = item['market']['order']['price']
item['totalAmount'] = item['market']['order']['totalAmount']
item['roomName'] = item['market']['order']['roomName']
else:
continue
self.saveFee(item)
else:
item['resourceType'] = item['market']['resourceType']
Expand Down

0 comments on commit b4ab25d

Please sign in to comment.