How to increase the adapter procedure timeout value in Worklight?

独自空忆成欢 提交于 2019-11-28 01:41:42

There are several places in Worklight where a timeout value can be specified:

CLIENT ----> WORKLIGHT SERVER -- (adapter) --> 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...

var wlInitOptions = 
{
    // # Worklight server connection timeout
    timeout: 60000,
    ...
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!