如何在Worklight中增加适配器过程超时值? [英] How to increase the adapter procedure timeout value in Worklight?
问题描述
如何增加Worklight适配器过程的超时值?我的应用程序崩溃,我在异常详细信息中看到以下内容:
How can I increase the timeout value of a Worklight adapter procedure? My app crashes and I see the following in the exception details:
response [/ apps / services / api / index / common / query ]成功:/ -secure-
{responseID:24,errors:[调用程序'getFTTitle'的
在30
秒后超时。 ],isSuccessful:false,警告:[],info:[]} /
推荐答案
Worklight中有几个地方可以指定超时值:
There are several places in Worklight where a timeout value can be specified:
客户端---->工作服务器 - - (适配器) - > BACKEND
CLIENT ----> WORKLIGHT SERVER -- (adapter) --> BACKEND
您可以增加适配器过程超时(Worklight Server - > Backend),如下所示:
You can increase the adapter procedure timeout (Worklight Server --> Backend) as follows:
<procedure name="nameHere" requestTimeoutInSeconds="valueHere"/>
我不知道你的具体用例是什么,所以一定要增加客户端超时。让它们相互匹配。
I don't know what is your specific use case, so be sure to also increase the client-side timeout. Have them match each other.
WL.Client.invokeProcedure(invocationData,{
onSuccess : getDataSuccess,
onFailure : getDataFailure,
timeout : valueHere
});
另请注意,如果您需要将超时时间增加到一分钟,请考虑某些事情可能不是就在这里......
Also note that if you need to increase your timeout to a whole minute, consider that something may not be right here...
这篇关于如何在Worklight中增加适配器过程超时值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!