[Mod]clear thread handler when downloading data failed
This commit is contained in:
parent
dfaf304189
commit
4c3c80acb7
@ -329,14 +329,14 @@ class BacktesterEngine(BaseEngine):
|
||||
symbol, exchange, Interval(interval), start, end
|
||||
)
|
||||
|
||||
if not data:
|
||||
if data:
|
||||
database_manager.save_bar_data(data)
|
||||
self.write_log(f"{vt_symbol}-{interval}历史数据下载完成")
|
||||
else:
|
||||
self.write_log(f"数据下载失败,无法获取{vt_symbol}的历史数据")
|
||||
|
||||
database_manager.save_bar_data(data)
|
||||
|
||||
# Clear thread object handler.
|
||||
self.thread = None
|
||||
self.write_log(f"{vt_symbol}-{interval}历史数据下载完成")
|
||||
|
||||
def start_downloading(
|
||||
self,
|
||||
|
Loading…
Reference in New Issue
Block a user