harmony: use where when updating machine timestamp

This commit is contained in:
Łukasz Magiera 2024-02-17 23:12:11 +01:00
parent 9f9e2f7fe4
commit bcc1d09c84

View File

@ -82,7 +82,7 @@ func Register(db *harmonydb.DB, hostnameAndPort string) (*Reg, error) {
if reg.shutdown.Load() {
return
}
_, err := db.Exec(ctx, `UPDATE harmony_machines SET last_contact=CURRENT_TIMESTAMP`)
_, err := db.Exec(ctx, `UPDATE harmony_machines SET last_contact=CURRENT_TIMESTAMP where id=$1`, reg.MachineID)
if err != nil {
logger.Error("Cannot keepalive ", err)
}