|
|
@ -619,13 +619,17 @@ async function afterLogin(socket, user) {
|
|
|
|
|
|
|
|
|
|
|
|
let monitorList = await sendMonitorList(socket)
|
|
|
|
let monitorList = await sendMonitorList(socket)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sendNotificationList(socket)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Delay a bit, so that it let the main page to query the data first, since SQLite can process one sql at the same time only.
|
|
|
|
|
|
|
|
// For example, query the edit data first.
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
for (let monitorID in monitorList) {
|
|
|
|
for (let monitorID in monitorList) {
|
|
|
|
sendHeartbeatList(socket, monitorID);
|
|
|
|
sendHeartbeatList(socket, monitorID);
|
|
|
|
sendImportantHeartbeatList(socket, monitorID);
|
|
|
|
sendImportantHeartbeatList(socket, monitorID);
|
|
|
|
Monitor.sendStats(io, monitorID, user.id)
|
|
|
|
Monitor.sendStats(io, monitorID, user.id)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 500);
|
|
|
|
sendNotificationList(socket)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function getMonitorJSONList(userID) {
|
|
|
|
async function getMonitorJSONList(userID) {
|
|
|
|