I've set up a scheduled event listener that will delete documents that are no longer considered relevant. It seems to be working, I'm just concerned by the some of the log messages that seem to be triggered by various nuxeo processes directly after it finishes running.
16:37:22,412 INFO [ScheduledUnsavedContentUtil] Removed 10 unsaved documents
16:37:22,448 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,449 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,449 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,450 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,450 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,451 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,451 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,451 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,452 WARN [NXAuditEventsService] Document associated to event does not exists anymore
16:37:22,452 WARN [NXAuditEventsService] Document associated to event does not exists anymore
The code that is responsible for deleting the documents is below, the getCandidates() method is using an NXQL query to determine which docs to target :
DocumentModelList documentModelList = getCandidates();
LOG.info("About to remove " + documentModelList.size() + " unsaved documents");
DocumentRef[] docRefs = new DocumentRef[documentModelList.size()];
int i = 0;
for (DocumentModel documentModel : documentModelList)
{
docRefs[i++] = documentModel.getRef();
}
coreSession.removeDocuments(docRefs);
coreSession.save();
Are those warnings anything to be concerned about? Or is there something I should be running that will clean up any remaining state related to these documents?