do the same for the real heartbeat fn

This commit is contained in:
Cian Johnston 2024-01-05 15:23:44 +00:00
parent 7574a3c589
commit efdfc9435a
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -272,6 +272,9 @@ func (s *server) heartbeat(ctx context.Context) error {
}
func (s *server) defaultHeartbeat(ctx context.Context) error {
if ctx.Err() != nil {
return nil // we are probably shutting down
}
//nolint:gocritic // This is specifically for updating the last seen at timestamp.
return s.Database.UpdateProvisionerDaemonLastSeenAt(dbauthz.AsSystemRestricted(ctx), database.UpdateProvisionerDaemonLastSeenAtParams{
ID: s.ID,