joyent / conch-api

Datacenter build and management service
Mozilla Public License 2.0
22 stars 11 forks source link

delete old device reports #1060

Closed karenetheridge closed 3 years ago

karenetheridge commented 3 years ago

We will delete all device reports (and associated validation_state records, and then orphaned validation_results) that are older than 6 months, except we retain the most recent report of each state (error, fail, pass).

Due to the amount of time to run (6+ hours), it is implemented mainly as a command that can be run in parallel with normal operations, rather than as a database migration that is run in between system restarts.