mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 17:57:37 +00:00
Remove LastSuccessfulUpdate from Machine
This field is no longer used, it was used in our old state "algorithm" to determine if we should send an update. Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:

committed by
Kristoffer Dalby

parent
591ff8d347
commit
3bef63bb80
@@ -318,11 +318,8 @@ func (hsdb *HSDatabase) MachineSetExpiry(machine *types.Machine, expiry time.Tim
|
||||
}
|
||||
|
||||
func (hsdb *HSDatabase) machineSetExpiry(machine *types.Machine, expiry time.Time) error {
|
||||
now := time.Now()
|
||||
|
||||
if err := hsdb.db.Model(machine).Updates(types.Machine{
|
||||
LastSuccessfulUpdate: &now,
|
||||
Expiry: &expiry,
|
||||
Expiry: &expiry,
|
||||
}).Error; err != nil {
|
||||
return fmt.Errorf(
|
||||
"failed to refresh machine (update expiration) in the database: %w",
|
||||
|
Reference in New Issue
Block a user