gpt4 book ai didi

javascript - Wakanda 4Dmobile超时问题

转载 作者:行者123 更新时间:2023-11-30 00:13:16 25 4
gpt4 key购买 nike

我正在使用 4D 移动设备从 Wakanda Enterpise v11 连接到 4D 服务器并连接到远程数据存储。我尊重 60 分钟的超时值。

在 4D 中,在 4D Mobile Authentication Method 上,所有数据都正常($1 包含用户名,$2 包含密码)。

当闲置时间超过 60 分钟并尝试发送 wakanda 请求时,4D 移动身份验证方法 4D $1$2, .. 值为空并返回“错误”。

如何从 wakanda 服务器函数重新启动/重新加载 wakanda 服务器/模型,或者如何将超时设置为无限制?

我正在尝试使用

恢复与 4D 服务器的连接
  • mergeoutsidecatalog()
  • 向 4D 发送休息请求
  • 等等

没有效果

最佳答案

mergeoutsidecatalog() 的文档状态:

timeout (object-based syntax only): timeout of client connections on the 4D server (pass a number expressing minutes). Each client query that requires a REST access to the external 4D database will create or use a client connection (process) on the 4D server side, keeping the client context. By default, the connection is closed after 60 minutes of inactivity. You can reduce this timeout to 15 minutes, depending on your needs.

因此,要保持连接有效,您需要在超时结束前发送查询。

问题是,一旦超时你就不能调用 mergeoutsidecatalog()再次;它只能在加载 Model 对象时完成,因此您需要重新启动 Wakanda。此行为记录在 mergeoutsidecatalog() 中文档:

This method must be called when the current Model object is loaded, that is, in the context of the Model.js file.

检查 currentSession()可能会帮助您隔离最终用户 session 何时过期,但我认为将用户重定向到登录页面不会有帮助,因为 Wakanda 服务器将无法调用 mergeoutsidecatalog()无需重新加载模型(即重新启动 Wakanda)。

如果您希望无限期保持 4D 和 Wakanda 之间的连接,那么您需要:

a) 将超时增加到一个非常大的数字(也许尝试 0 看看它是否禁用超时)
或者
b) 通过在超时结束前发送查询来保持与 4D 服务器的心跳连接

关于javascript - Wakanda 4Dmobile超时问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35630475/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com