对于超时,有一种处理方式:如果服务超时了,那把本次请求的消息id返回,并返回超时,下次请求的时候,带入上次得到的请求返回的消息id,服务通过消息id查询该id对应的返回。

/// 系统工具,查询某个表的值所在的字段 Class User.PTFV Extends %Persistent [ Final ] { /// 表名 Property TbNme As %String(MAXLEN = ""); /// 字段名 Property FildNme As %String(MAXLEN = ""); /// 字段描述 Property FildDesc As %String(MAXLEN = ""); /// 值 Property Value As %String(MAXLEN = ""); /// 列序号 Property FildNo As %String; /// 表名-%id Property TbID As %String(MAXLEN = ""); ClassMethod Global(TbNme As %String = "", Condition As %String = "", StopSubscript As %String = "") As %Boolean [ SqlName = PTFV, SqlProc ] { s TbNme=$tr(TbNme,$c(0),"") q:TbNme="" $$$OK s:TbNme'["." TbNme="SQLUSER."_TbNme ;s:Condition'["'" Condition=$p(Condition,"=")_"='"_$p(Condition,"=",2)_"'" #dim val as %String = "" k ^||User.PTFVD s sql="SELECT %id As TbID,* FROM "_TbNme_" where "_Condition s rset=##class(%ResultSet).%New("%DynamicQuery:SQL") s sc=rset.Prepare(sql) s rset.RuntimeMode="1" i $$$ISERR(sc) { d DisplayError^%apiOBJ(sc) q $$$OK } s sc=rset.Execute() i $$$ISERR(sc) Do DisplayError^%apiOBJ(sc) q $$$OK While rset.Next(.sc) { s TbID=rset.Data("TbID") s FildNme="" f s FildNme=$o(rset.Data(FildNme)) q:FildNme="" d .q:FildNme="TbID" .s (FildDesc,Value,FildNo)="" .s Value=rset.Data(FildNme) .s ^||User.PTFVD($i(^||User.PTFVD))=$lb(TbNme,FildNme,FildDesc,Value,FildNo,TbID) } q $$$OK } Storage Default { TbNme FildNme FildDesc Value FildNo TbID ^||User.PTFVD PTFVDefaultData ^||User.PTFVD ^||User.PTFVI ^||User.PTFVS %Library.CacheStorage } } 这个是的代码,我希望能得到 FildDesc和FildNo的值