def onGetTickListRsp(rpcGetTickListRsp): reqId = rpcGetTickListRsp.commonRsp.reqId RpcClientRspHandler.__waitReqIdSetLock.acquire() RpcClientRspHandler.__rpcGetTickListRspDictLock.acquire() try: if reqId in RpcClientRspHandler.__waitReqIdSet: RpcClientRspHandler.__rpcGetTickListRspDict[ reqId] = rpcGetTickListRsp else: logger.info("直接丢弃的回报,请求ID:%s", reqId) finally: RpcClientRspHandler.__waitReqIdSetLock.release() RpcClientRspHandler.__rpcGetTickListRspDictLock.release() if rpcGetTickListRsp.tick: ClientTradeCacheService.storeTickList(rpcGetTickListRsp.tick)
def onRpcTickListRtn(rpcTickListRtn): ClientTradeCacheService.storeTickList(rpcTickListRtn.tick)