The maximum age a file must reach in seconds before a deletion of the file in the workspace cleanup operation is performed
but in modules/matterhorn-workspace-impl/src/main/java/org/opencastproject/workspace/impl/WorkspaceImpl.java
we have this comparison:
maxAgeReached = FileUtils.isFileOlder(file, new Date().getTime() + maxAge.get());
java.util.Date.getTime() is milliseconds. So maxAge is being interpreted as a ms value which means that instead of the default value being equal to 30 days, it is actually 43min.
Plus the logic of this looks wrong - surely
maxAgeReached = FileUtils.isFileOlder(file, new Date().getTime() - maxAge.get());
you assigned this to yourself which made me stop working on this issue. Do you actually still work on this? Otherwise please assign this ticket to me and I will fix this.
Feel free to work on it.
ok, I'll then take over
Good news first: The main issues of this ticket (ms vs s) are already fixed with commit 865669a3 from Lukas. But there are still a couple of issues that were described here in the comments left. I'll create a pull request to fix them as well.
is a simplified version of the patch for 1.x that just makes sure the maxAge is interpreted correctly.
is a larger patch fot 2.1 which fixes all the issues that have been raised on this ticket, including all the comments.