REPO-5571 : Add tempFileCleanerTrigger configurations to be able to limit the job duration/quantity

- fixed log order
This commit is contained in:
Lucian Tuca
2021-02-24 17:30:13 +02:00
committed by GitHub
parent 2cbd2d98d4
commit 43410785a5

View File

@@ -517,16 +517,16 @@ public class TempFileProvider
// it is a file - attempt a delete
try
{
if(logger.isDebugEnabled())
{
logger.debug("Deleting temp file: " + file);
}
// only delete if the limits allow
if (maxFilesToDelete != null && maxFilesToDelete.get() <= 0 ||
maxTimeToRun != null && ((jobStartTime + maxTimeToRun.toMillis()) < System.currentTimeMillis()))
{
return count;
}
if(logger.isDebugEnabled())
{
logger.debug("Deleting temp file: " + file);
}
file.delete();
if (maxFilesToDelete != null)
{