Closed bregman-arie closed 8 years ago
resources is an additive collection object with no reset right now. This refactor Breaks the age related cleanup behavior. Prior behavior it would clean up one old instance per run, this branch attempts to cleanup up all of them.
If you want to change behavior please make that a separate pull request, if you are refactoring please maintain all functionality in the refactor.
Will not merge as is.
Also I'd like to see unittest around the age selection functionality before it is moved.
"Prior behavior it would clean up one old instance per run, this branch attempts to cleanup up all of them"
Why would you want it cleanup only one per run? I'm not sure if it's clear for users who use it. I would expect it to cleanup all old instances..
select_age module contains one method that can be included in resources.
In my opinion it should be contained in resources since there is no real use for it as a seperate object. It only selects resources (as resource module) but by age parameters.
In addition, it will allow us to move all "old" and "unused" logic from janitor main loop to resources module where it should be.