[ https://issues.apache.org/jira/browse/SLING-7039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16121255#comment-16121255 ]
Karl Pauls commented on SLING-7039: ----------------------------------- [~cziegeler], I see your point. Basically, I was interpreting the period mostly as a limit on the scanning while you see it as a user facing promise for the max age of stored events. Makes sense :-). I'll change it to be: {code:java} if (this.configuration.getHistoryCleanUpRemovedJobs() > 0 && schedulerRuns % 60 == 1) { Calendar removeDate = Calendar.getInstance(); removeDate.add(Calendar.MINUTE, - this.configuration.getHistoryCleanUpRemovedJobs()); this.historyCleanUpRemovedJobs(removeDate); } {code} which makes it so that we scan every hour and delete everything older than the configured period (which should be good enough). > Clean up jobs in state dropped and errors > ----------------------------------------- > > Key: SLING-7039 > URL: https://issues.apache.org/jira/browse/SLING-7039 > Project: Sling > Issue Type: Improvement > Components: Extensions > Reporter: Carsten Ziegeler > Assignee: Karl Pauls > Fix For: Event 4.3.0 > > Attachments: SLING-7039.patch > > > Currently, whenever a job is removed by a user (or client code), the job is > kept as a dropped job - regardless of whether a history should be kept for > these types of jobs. The same happens if the job can't be scheduled (error). > This information is useful for trouble shooting (to find out if a particular > job has been created at all or not). > Now, as the job impl is keeping track of these things, I think it also should > be the job impl which cleans this up. The configuration for this would be a > time period during which these jobs are kept (like 48h or something). All > older jobs are removed. > Or in other words: the job impl should periodically run the > HistoryCleanUpTask to remove jobs in state DROPPED and ERROR which are older > than the configured time. > I think the time would be a global configuration of the job handling, > defaulting to 48h -- This message was sent by Atlassian JIRA (v6.4.14#64029)