[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)
|
if (pQuot)
|
||||||
{
|
{
|
||||||
task.task_data = pQuot;
|
task.task_data = *pQuot;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -301,7 +301,8 @@ class DrEngine(object):
|
|||||||
while self.active:
|
while self.active:
|
||||||
try:
|
try:
|
||||||
dbName, collectionName, d = self.queue.get(block=True, timeout=1)
|
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:
|
except Empty:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -7,17 +7,9 @@ import traceback
|
|||||||
# 默认设置
|
# 默认设置
|
||||||
from chinese import text
|
from chinese import text
|
||||||
|
|
||||||
# 获取目录上级路径
|
# 获取全局配置
|
||||||
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
from vnpy.trader.vtGlobal import globalSetting
|
||||||
SETTING_FILENAME = 'VT_setting.json'
|
|
||||||
SETTING_FILENAME = os.path.join(path, SETTING_FILENAME)
|
|
||||||
|
|
||||||
# 打开配置文件,读取语言配置
|
# 打开配置文件,读取语言配置
|
||||||
try:
|
if globalSetting['language'] == 'english':
|
||||||
f = file(SETTING_FILENAME)
|
from english import text
|
||||||
setting = json.load(f)
|
|
||||||
if setting['language'] == 'english':
|
|
||||||
from english import text
|
|
||||||
f.close()
|
|
||||||
except:
|
|
||||||
traceback.print_exc()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user