astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
236 stars 45 forks source link

Pairing: do not reset device stats on re-registration #925

Closed Annopaolo closed 3 months ago

Annopaolo commented 3 months ago

When a device is unregistered and re-registered, the total sent bytes/messages counters are set to 0. This causes an inconsistency with bytes sent on interfaces. Fix this by not resetting counters. Fix #776.

Code is duplicated in queries.ex because string-based querying does not allow for much extensibility.