-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cleaner for orphaned files #1406
Conversation
LOGGER.debug(MessageFormat.format(Messages.GETTING_OPERATIONS_STARTED_AFTER_0, oneHourAgo)); | ||
var operations = operationService.createQuery() | ||
.startedAfter(oneHourAgo) | ||
.withMtaIdsIn(List.copyOf(fileIds)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File ID is the same as the MTA ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, this was a leftover from when the code assumed the operations had a relation to the files.
Removed
...s/src/main/java/org/cloudfoundry/multiapps/controller/process/jobs/OrphanedFilesCleaner.java
Show resolved
Hide resolved
...s/src/main/java/org/cloudfoundry/multiapps/controller/process/jobs/OrphanedFilesCleaner.java
Show resolved
Hide resolved
...s/src/main/java/org/cloudfoundry/multiapps/controller/process/jobs/OrphanedFilesCleaner.java
Show resolved
Hide resolved
LOGGER.debug(Messages.NO_ORPHANED_FILES_TO_DELETE); | ||
return; | ||
} | ||
LOGGER.debug(MessageFormat.format(Messages.DELETING_ORPHANED_FILES_0, fileIdsToFiles.keySet())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log how many files are deleted
...s/src/main/java/org/cloudfoundry/multiapps/controller/process/jobs/OrphanedFilesCleaner.java
Outdated
Show resolved
Hide resolved
...s/src/main/java/org/cloudfoundry/multiapps/controller/process/jobs/OrphanedFilesCleaner.java
Outdated
Show resolved
Hide resolved
Delete files that have no started operation within the last hour LMCROSSITXSADEPLOY-2714
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just log how many files are deleted
Delete files that have no started operation within the last hour
LMCROSSITXSADEPLOY-2714