As a System Engineer I want to be able to configure a maximum number of files that the TempFileCleaner can delete when it is triggered.
As a System Engineer I want to be able to configure a maximum duration for the TempFileCleaner to run after it starts.
As a note, in case both of the above configurations are set, the cleaner will stop when exceeding the first condition. (e.g. if maxFiles = 1000 and maxTime=1000hours, the cleaner will most likely stop after 1000 files)
Technical details for #2:
Use the standard java.time.duration for the config to be consistent with the other jobs and parameters as found.
In some cases, the listFiles() method can return null causing the cleaner to fail with a NullPointerException.
This should be fixed to avoid such future errors.
See REPO-5381.
I don't know the code as well as y’all do however when either the time or number of files is met, not and, we should stop the cleaner seems more prudent. we should discuss more on the call is setting up to review the Support feedback.
, I totally agree. That’s what I’ve tried to suggest via the note in the description.