Currently GC background processes are triggered by a timed "duration" style background thread. This is not very flexible and can cause problems as the duration is calculated on startup. This can lead to processes running at peak times, inadvertantly. This may not happen at first, but a restart or an outage can cause the process to be restarted, duration recalculated and then a DB intensive GC operation can then cause service slowness.
We should allow the triggering of these GC tasks via a POST. This should also allow the triggering of these jobs separately/independently. User's wanting full control of the GC processes could "disable" duration GC by setting the appropriate settings to 0. Users would then use use puppet to setup cron jobs for triggering these jobs when they want them to run (at the desired frequency).
This might need to be broken into more than one ticket, but below needs to be finished to call this task complete:
- One new "gc" endpoint (or parameter) for each GC task
- Documentation on disabling current behavior
- Documentation on the GC tasks along with recommendations on frequency/timing
- POST examples in docs to trigger the new GC calls
- Puppet code examples on setting up the GC tasks