protect against unforeseen issues in scanning thread

This commit is contained in:
robcaulk 2022-09-19 20:39:19 +02:00
parent a023ac26f3
commit 18fe70044d

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.