fix: compatible with old xugou_agent

This commit is contained in:
zaunist committed 2025-05-22 22:22:57 +08:00
1 parent 716aa43f99
commit 3b2d2db5ff
1 file changed
+1 -1
+1 -1
View File
@@ -41,7 +41,7 @@ export const checkAgentsStatus = async (c: any) => {
const timeDiff = now.getTime() - lastUpdateTime.getTime(); const timeDiff = now.getTime() - lastUpdateTime.getTime();
// 如果超过5个监控周期没有更新状态,将客户端状态设置为inactive // 如果超过5个监控周期没有更新状态,将客户端状态设置为inactive
if (timeDiff > (parseInt(agent.keepalive) * 5 * 1000)) { if (timeDiff > (parseInt(agent.keepalive || "60") * 5 * 1000)) {
console.log( console.log(
`定时任务: 客户端 ${agent.name} (ID: ${agent.id}) 超过5个监控周期未更新状态,设置为离线` `定时任务: 客户端 ${agent.name} (ID: ${agent.id}) 超过5个监控周期未更新状态,设置为离线`
); );