add pings table
This commit is contained in:
parent
31f7795fd7
commit
a123170622
4 changed files with 43 additions and 13 deletions
|
|
@ -44,7 +44,7 @@ exports.machineEvent = function machineEvent (rec) {
|
|||
const deleteSql = `delete from machine_events
|
||||
where device_id=$1
|
||||
and event_type=$2
|
||||
and created < now() - interval '2 hours'`
|
||||
and created < now() - interval '2 days'`
|
||||
|
||||
return db.none(sql, values)
|
||||
.then(() => db.none(deleteSql, [rec.deviceId, rec.eventType]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue