feat: ping time internet quality measurement
This commit is contained in:
parent
f2f146265e
commit
515d02dd21
7 changed files with 162 additions and 17 deletions
|
|
@ -276,6 +276,13 @@ 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.cryptoCode)
|
||||
}
|
||||
|
|
@ -743,7 +750,8 @@ function plugins (settings, deviceId) {
|
|||
sell,
|
||||
getNotificationConfig,
|
||||
notifyOperator,
|
||||
fetchCurrentConfigVersion
|
||||
fetchCurrentConfigVersion,
|
||||
pruneMachinesHeartbeat
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue