Add lock_reason to per-pair lock

This commit is contained in:
Matthias 2021-04-22 19:28:39 +02:00
parent f2d5f476d4
commit 0d2457cd47

View File

@ -456,7 +456,8 @@ class FreqtradeBot(LoggingMixin):
lock = PairLocks.get_pair_longest_lock(pair, nowtime) lock = PairLocks.get_pair_longest_lock(pair, nowtime)
if lock: if lock:
self.log_once(f"Pair {pair} is still locked until " self.log_once(f"Pair {pair} is still locked until "
f"{lock.lock_end_time.strftime(constants.DATETIME_PRINT_FORMAT)}.", f"{lock.lock_end_time.strftime(constants.DATETIME_PRINT_FORMAT)} "
f"due to {lock.reason}.",
logger.info) logger.info)
else: else:
self.log_once(f"Pair {pair} is still locked.", logger.info) self.log_once(f"Pair {pair} is still locked.", logger.info)