Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
from HSTTWO-2471
The FormDataCleanupModule
now extends AbstractReconfigurableDaemonModule. That is of course fine. However, we also have an EventLogCleanupModule. That module as well needs a job scheduler. I have the impression that almost until line 150 all code is pretty much only for scheduling a job in a deamon module, right? Also, I see completely un-understandable code like :
@Override
protected boolean isReconfigureEvent(Event event) throws RepositoryException
I see the exact same code in the EventLogCleanupModule. So I guess it will be an optimalization, but it doesn't make sense to have this hard to understand code in two classes that share so much code / knowledge (code duplication all over the place)
So, could the FormDataCleanupJob extend a new AbstractSchedulerJob where AbstractSchedulerJob takes care of most of the, afaics, general plumbing, and for example only has an abstract method
public abstract RepositoryJob getJob();
Then, the FormDataCleanupJob would not need all the complex plumbing, and only focus on what it wants to achieve: cleanup of nodes.
FormDataCleanupJob extends AbstractSchedulerJob {
public RepositoryJob getJob()
{ .... ... }
}
Or perhaps instead of
public abstract RepositoryJob getJob();
it could even be
public abstract Class<? extends RepositoryJob> getRepositoryJobClass();
Then the FormDataCleanupModule would have
@Override
public Class<? extends RepositoryJob> getRepositoryJobClass()
WDYT?
For the rest all looks fine.
Regards Ard
Attachments
Issue Links
- is a result of
-
HSTTWO-2471 Formdata nodes are never cleaned up
- Closed
- is awaited by
-
CMS-7306 Broken Links - Simplify Daemon Module by using AbstractReconfigurableSchedulingDaemonModule
- Closed