puppetlabs/puppetdb — pull request #919 by kbarber (2014-04-14 21:01:55+00:00)
Title: (PDB-526) Garbage collect unreferenced environments

This patch adds a new step for garbage-collect! which removes any environments
that are no longer referenced by reports, facts or catalogs.

It also changes the order that garbage-collect! runs compared to the other
db related cleanup tasks. This is so that unreferenced environments are
cleaned up immediately after nodes and reports are purged, as apposed to
having to wait for the next scheduled internal.

Signed-off-by: Ken Barber