Delete unwanted host records in batches
Delete unwanted host records in batches
This adds a batched migration, which:
- Finds all CurrentHostStats within the range of ids
- that have not a single Usage Ping
- that have been created this year
Then we start an iteration over those candidates:
- Continue, if there exists a UsagePingError for the host
- Get all version checks for the related host
- continue, if a single version check is safe to keep
- Otherwise deletes: VersionChecks, CurrentHostStats related to the host and the host itself.
Edited by Lukas Eipert