Avoid crash with /delete
When a trade is deleted between querying the database and actually handling the trade. closes #4326
This commit is contained in:
parent
327c23618f
commit
2b0d2070d0
@ -179,6 +179,7 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
# Without this, freqtrade my try to recreate stoploss_on_exchange orders
|
# Without this, freqtrade my try to recreate stoploss_on_exchange orders
|
||||||
# while selling is in process, since telegram messages arrive in an different thread.
|
# while selling is in process, since telegram messages arrive in an different thread.
|
||||||
with self._sell_lock:
|
with self._sell_lock:
|
||||||
|
trades = Trade.get_open_trades()
|
||||||
# First process current opened trades (positions)
|
# First process current opened trades (positions)
|
||||||
self.exit_positions(trades)
|
self.exit_positions(trades)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user