feat: machine performance indicators
This commit is contained in:
parent
9896b44178
commit
1a166bc279
9 changed files with 189 additions and 23 deletions
|
|
@ -289,6 +289,23 @@ function plugins (settings, deviceId) {
|
|||
])
|
||||
}
|
||||
|
||||
function pruneMachinesHeartbeat () {
|
||||
const sql = `DELETE
|
||||
FROM
|
||||
machine_network_heartbeat h
|
||||
USING (SELECT
|
||||
device_id,
|
||||
max(created) as lastEntry
|
||||
FROM
|
||||
machine_network_heartbeat
|
||||
GROUP BY
|
||||
device_id) d
|
||||
WHERE
|
||||
d.device_id = h.device_id
|
||||
AND h.created < d.lastEntry`
|
||||
db.none(sql)
|
||||
}
|
||||
|
||||
function isHd (tx) {
|
||||
return wallet.isHd(settings, tx)
|
||||
}
|
||||
|
|
@ -795,7 +812,8 @@ function plugins (settings, deviceId) {
|
|||
sell,
|
||||
getNotificationConfig,
|
||||
notifyOperator,
|
||||
fetchCurrentConfigVersion
|
||||
fetchCurrentConfigVersion,
|
||||
pruneMachinesHeartbeat
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue