harmony: use where when updating machine timestamp
This commit is contained in:
parent
9f9e2f7fe4
commit
bcc1d09c84
@ -82,7 +82,7 @@ func Register(db *harmonydb.DB, hostnameAndPort string) (*Reg, error) {
|
|||||||
if reg.shutdown.Load() {
|
if reg.shutdown.Load() {
|
||||||
return
|
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 {
|
if err != nil {
|
||||||
logger.Error("Cannot keepalive ", err)
|
logger.Error("Cannot keepalive ", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user