mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-02 03:33:05 +00:00
Added some log messages
This commit is contained in:
parent
602edcd1d7
commit
841f811f35
1 changed files with 2 additions and 0 deletions
|
@ -375,6 +375,7 @@ func (h *Headscale) ExpireMachine(machine *Machine) {
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
machine.Expiry = &now
|
machine.Expiry = &now
|
||||||
|
|
||||||
|
log.Trace().Msgf("Expiring machine %s", machine.Name)
|
||||||
h.setLastStateChangeToNow(machine.Namespace.Name)
|
h.setLastStateChangeToNow(machine.Namespace.Name)
|
||||||
|
|
||||||
h.db.Save(machine)
|
h.db.Save(machine)
|
||||||
|
@ -387,6 +388,7 @@ func (h *Headscale) RefreshMachine(machine *Machine, expiry time.Time) {
|
||||||
machine.LastSuccessfulUpdate = &now
|
machine.LastSuccessfulUpdate = &now
|
||||||
machine.Expiry = &expiry
|
machine.Expiry = &expiry
|
||||||
|
|
||||||
|
log.Trace().Msgf("Refreshing machine %s", machine.Name)
|
||||||
h.setLastStateChangeToNow(machine.Namespace.Name)
|
h.setLastStateChangeToNow(machine.Namespace.Name)
|
||||||
|
|
||||||
h.db.Save(machine)
|
h.db.Save(machine)
|
||||||
|
|
Loading…
Reference in a new issue