MCPcopy Create free account
hub / github.com/MemTensor/MemOS / initOnlineTracking

Method initOnlineTracking

apps/memos-local-openclaw/src/hub/server.ts:1094–1106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1092 }
1093
1094 private initOnlineTracking(): void {
1095 try {
1096 const ownerId = this.authState.bootstrapAdminUserId || "";
1097 const users = this.opts.store.listHubUsers("active");
1098 const now = Date.now();
1099 for (const u of users) {
1100 if (u.id === ownerId) continue;
1101 if (u.lastActiveAt && now - u.lastActiveAt < HubServer.OFFLINE_THRESHOLD_MS) {
1102 this.knownOnlineUsers.add(u.id);
1103 }
1104 }
1105 } catch { /* best-effort */ }
1106 }
1107
1108 private checkOfflineUsers(): void {
1109 try {

Callers 1

startMethod · 0.95

Calls 2

listHubUsersMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected