0.1.52 Gateway
This commit is contained in:
@@ -297,6 +297,10 @@ func (s *Server) handleDeleteDevice(w http.ResponseWriter, r *http.Request, curr
|
||||
s.loggerFor(r.Context()).Warn("device version cleanup failed",
|
||||
"removed_device_id", deviceID, "error", err)
|
||||
}
|
||||
if err := s.store.DeleteDeviceActivityDays(r.Context(), deviceID); err != nil {
|
||||
s.loggerFor(r.Context()).Warn("device activity cleanup failed",
|
||||
"removed_device_id", deviceID, "error", err)
|
||||
}
|
||||
// A device disappearing from a household is worth a line: the next thing that TV
|
||||
// reports is a sign-in, and the two together explain each other.
|
||||
s.loggerFor(r.Context()).Info("device signed out remotely", "removed_device_id", deviceID)
|
||||
@@ -335,6 +339,9 @@ func (s *Server) retireSupersededDevices(ctx context.Context, devices []store.Su
|
||||
if err := s.store.DeleteDeviceVersions(ctx, ids...); err != nil {
|
||||
s.loggerFor(ctx).Warn("device version cleanup failed", "error", err)
|
||||
}
|
||||
if err := s.store.DeleteDeviceActivityDays(ctx, ids...); err != nil {
|
||||
s.loggerFor(ctx).Warn("device activity cleanup failed", "error", err)
|
||||
}
|
||||
s.loggerFor(ctx).Info("device identity superseded", "retired_device_ids", ids)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user