def onGetMixContractListRsp(rpcGetMixContractListRsp): reqId = rpcGetMixContractListRsp.commonRsp.reqId RpcClientRspHandler.__waitReqIdSetLock.acquire() RpcClientRspHandler.__rpcGetMixContractListRspDictLock.acquire() try: if reqId in RpcClientRspHandler.__waitReqIdSet: RpcClientRspHandler.__rpcGetMixContractListRspDict[ reqId] = rpcGetMixContractListRsp else: logger.info("直接丢弃的回报,请求ID:%s", reqId) finally: RpcClientRspHandler.__waitReqIdSetLock.release() RpcClientRspHandler.__rpcGetMixContractListRspDictLock.release() if rpcGetMixContractListRsp.contract: ClientTradeCacheService.storeContractList( rpcGetMixContractListRsp.contract)
def onRpcContractListRtn(rpcContractListRtn): ClientTradeCacheService.storeContractList(rpcContractListRtn.contract)