clean_installed_packages script logs a count(*), causing slow performance
The clean_installed_packages.rake script prints the count of remaining records for every batch of 20,000. This query can take upwards of two hours on a busy katello system.
Additionally, the script will error out if any records are modified in between the time the "existing" list is created, and the time the batch is cleaned. This can happen if a new system is registered while the script runs.
Fixes #20946 - fix log messages for cleanup script
The cleanup script was doing a count(*) on a large table, which could
take hours on a busy system. This has been removed.
Additionally, if a deletion fails due to data changing while the script
runs, the script will log a message but continue. The bulk delete
setting will not be updated unless there is a :100:% clean run.