use get_all_locks to get locks for backtest result
This commit is contained in:
@@ -123,3 +123,11 @@ class PairLocks():
|
||||
now = datetime.now(timezone.utc)
|
||||
|
||||
return len(PairLocks.get_pair_locks(pair, now)) > 0 or PairLocks.is_global_lock(now)
|
||||
|
||||
@staticmethod
|
||||
def get_all_locks() -> List[PairLock]:
|
||||
|
||||
if PairLocks.use_db:
|
||||
return PairLock.query.all()
|
||||
else:
|
||||
return PairLocks.locks
|
||||
|
Reference in New Issue
Block a user