Skip to content
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

#22033 Create getAvailableTimeMachineFolder method #28574

Conversation

freddyDOTCMS
Copy link
Contributor

@freddyDOTCMS freddyDOTCMS commented May 15, 2024

This is a third PR for #22033

First one: #28530
Second one: #28564

Proposed Changes

  • Create the getAvailableTimeMachineFolder Method

https://github.com/dotCMS/core/pull/28574/files#diff-5d7a647e09c3a207a6c502bdb945879b865d3dc8ad0cd7cc8c3b4fa233edd3aeR53

  • I realized that the TomeMachine Job created the folder with the "tm_" preffix instead of "timeMachineBundle" preffix, so I have to update all the test:

https://github.com/dotCMS/core/pull/28574/files#diff-5ec720d6f4deb8a5228aee22286a6bbf3103289becc6d1fa4947017c9052f935L66-R151

https://github.com/dotCMS/core/pull/28574/files#diff-f27467cb9919462f8c7c5a137c3c9b9bf21be349047c0d1e1ba9315773e53298L43-R59

  • Turn the "tm_" preffix into a Constant

https://github.com/dotCMS/core/pull/28574/files#diff-19b28e2982b6db869240fb8fc96a2bf2c156e3607f41656fd16d7845c45ba604R37

and use it to create a FileFilter

https://github.com/dotCMS/core/pull/28574/files#diff-19b28e2982b6db869240fb8fc96a2bf2c156e3607f41656fd16d7845c45ba604R245-R251

  • The notRemoveNotTimeMachineFolder test was wrong because the "TIMEMACHINE_PATH" property was not being set on the test:

https://github.com/dotCMS/core/pull/28574/files#diff-f27467cb9919462f8c7c5a137c3c9b9bf21be349047c0d1e1ba9315773e53298R132

Checklist

  • Tests

Additional Info

Later, I am going to use this method on the PruneTimeMachineBackupJob.java to know when it need to be stopped, this job should be started when the TimeMachineJob is started and should be finished after the TimeMachineJob is stopped and no more Time Machine Folder are pending to be cleaned up

Base automatically changed from issue-22033-Create_PruneTimeMachineBackupJob-class to master May 15, 2024 16:06
@freddyDOTCMS freddyDOTCMS marked this pull request as ready for review May 15, 2024 16:09
@freddyDOTCMS freddyDOTCMS added this pull request to the merge queue May 16, 2024
Merged via the queue into master with commit 59b38a3 May 16, 2024
26 checks passed
@freddyDOTCMS freddyDOTCMS deleted the issue-22033-create-getAvailableTimeMachineFolder-util-method branch May 16, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

3 participants