取消不使用的交易接口
This commit is contained in:
parent
4e9026be8b
commit
2075fe9866
@ -14,6 +14,7 @@ from ctaAlgo.ctaEngine import CtaEngine
|
||||
from dataRecorder.drEngine import DrEngine
|
||||
from riskManager.rmEngine import RmEngine
|
||||
|
||||
import logging
|
||||
|
||||
########################################################################
|
||||
class MainEngine(object):
|
||||
@ -63,6 +64,7 @@ class MainEngine(object):
|
||||
except Exception, e:
|
||||
print e
|
||||
|
||||
"""
|
||||
try:
|
||||
from ltsGateway.ltsGateway import LtsGateway
|
||||
self.addGateway(LtsGateway, 'LTS')
|
||||
@ -123,7 +125,7 @@ class MainEngine(object):
|
||||
self.gatewayDict['OANDA'].setQryEnabled(True)
|
||||
except Exception, e:
|
||||
print e
|
||||
|
||||
"""
|
||||
# ----------------------------------------------------------------------
|
||||
def addGateway(self, gateway, gatewayName=None):
|
||||
"""创建接口"""
|
||||
@ -209,6 +211,9 @@ class MainEngine(object):
|
||||
event.dict_['data'] = log
|
||||
self.eventEngine.put(event)
|
||||
|
||||
# 写入本地log日志
|
||||
logging.info(content)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
def dbConnect(self):
|
||||
"""连接MongoDB数据库"""
|
||||
|
@ -94,6 +94,10 @@ class VtGateway(object):
|
||||
event1.dict_['data'] = error
|
||||
self.eventEngine.put(event1)
|
||||
|
||||
logMsg = u'{0}:[{1}]:{2}'.format(error.gatewayName, error.errorID,error.errorMsg )
|
||||
# 写入本地log日志
|
||||
logging.info(logMsg)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
def onLog(self, log):
|
||||
"""日志推送"""
|
||||
|
Loading…
Reference in New Issue
Block a user