Better exception handling for check_handle_timedout

This commit is contained in:
Stephen Dade 2018-01-17 19:51:27 +11:00
parent 01e10014bb
commit 04be438b35

View File

@ -131,7 +131,8 @@ def check_handle_timedout(timeoutvalue: int) -> None:
for trade in Trade.query.filter(Trade.open_order_id.isnot(None)).all():
try:
order = exchange.get_order(trade.open_order_id)
except OperationalException:
except requests.exceptions.RequestException:
logger.info('Cannot query order for %s due to %s', trade, traceback.format_exc())
continue
ordertime = arrow.get(order['opened'])