[Fix]解决飞鼠行情接口3点后崩溃的问题
This commit is contained in:
parent
6d3b16e663
commit
e92b576a8c
File diff suppressed because one or more lines are too long
@ -372,7 +372,7 @@ void MdApi::OnRtnDeferDeliveryQuot(CThostDeferDeliveryQuot *pQuot)
|
||||
|
||||
if (pQuot)
|
||||
{
|
||||
task.task_data = pQuot;
|
||||
task.task_data = *pQuot;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -301,7 +301,8 @@ class DrEngine(object):
|
||||
while self.active:
|
||||
try:
|
||||
dbName, collectionName, d = self.queue.get(block=True, timeout=1)
|
||||
self.mainEngine.dbInsert(dbName, collectionName, d)
|
||||
flt = {'datetime': d['datetime']}
|
||||
self.mainEngine.dbUpdate(dbName, collectionName, d, flt, True)
|
||||
except Empty:
|
||||
pass
|
||||
|
||||
|
@ -7,17 +7,9 @@ import traceback
|
||||
# 默认设置
|
||||
from chinese import text
|
||||
|
||||
# 获取目录上级路径
|
||||
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
SETTING_FILENAME = 'VT_setting.json'
|
||||
SETTING_FILENAME = os.path.join(path, SETTING_FILENAME)
|
||||
# 获取全局配置
|
||||
from vnpy.trader.vtGlobal import globalSetting
|
||||
|
||||
# 打开配置文件,读取语言配置
|
||||
try:
|
||||
f = file(SETTING_FILENAME)
|
||||
setting = json.load(f)
|
||||
if setting['language'] == 'english':
|
||||
if globalSetting['language'] == 'english':
|
||||
from english import text
|
||||
f.close()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
Loading…
Reference in New Issue
Block a user