protect against unforeseen issues in scanning thread

This commit is contained in:
robcaulk 2022-09-19 20:39:19 +02:00 committed by Robert Caulk
parent 32d46e8a6b
commit b5fd11f91b

View File

@ -205,9 +205,13 @@ class IFreqaiModel(ABC):
if retrain:
self.train_timer('start')
self.extract_data_and_train_model(
new_trained_timerange, pair, strategy, dk, data_load_timerange
)
try:
self.extract_data_and_train_model(
new_trained_timerange, pair, strategy, dk, data_load_timerange
)
except Exception as msg:
logger.warning(f'Training {pair} raised exception {msg}, skipping.')
self.train_timer('stop')
# only rotate the queue after the first has been trained.