Пример #1
0
    def onGetAccountListRsp(rpcGetAccountListRsp):
        reqId = rpcGetAccountListRsp.commonRsp.reqId

        RpcClientRspHandler.__waitReqIdSetLock.acquire()
        RpcClientRspHandler.__rpcGetAccountListRspDictLock.acquire()
        try:
            if reqId in RpcClientRspHandler.__waitReqIdSet:
                RpcClientRspHandler.__rpcGetAccountListRspDict[
                    reqId] = rpcGetAccountListRsp
            else:
                logger.info("直接丢弃的回报,请求ID:%s", reqId)
        finally:
            RpcClientRspHandler.__waitReqIdSetLock.release()
            RpcClientRspHandler.__rpcGetAccountListRspDictLock.release()

        if rpcGetAccountListRsp.account:
            ClientTradeCacheService.storeAccountList(
                rpcGetAccountListRsp.account)
 def onRpcAccountListRtn(rpcAccountListRtn):
     ClientTradeCacheService.storeAccountList(rpcAccountListRtn.account)