Skip to content

Commit

Permalink
break ohlcv waiting upon stop signal
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Sep 24, 2024
1 parent 45d9cdb commit 9832b62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/passivbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ def get_last_position_changes(self, symbol=None):
async def wait_for_ohlcvs_1m_to_update(self):
await asyncio.sleep(1.0)
prev_print_ts = utc_ms() - 5000.0
while self.n_symbols_missing_ohlcvs_1m > self.max_n_concurrent_ohlcvs_1m_updates - 1:
while (
not self.stop_signal_received
and self.n_symbols_missing_ohlcvs_1m > self.max_n_concurrent_ohlcvs_1m_updates - 1
):
if utc_ms() - prev_print_ts > 1000 * 10:
logging.info(
f"Waiting for ohlcvs to be refreshed. Number of symbols with "
Expand Down

0 comments on commit 9832b62

Please sign in to comment.