historyEl.addContent(new Element("cleared").
setAttribute("recordsRemoved", numberOfRecordsRemoved + ""));
final String lastRun = new DateTime().withZone(DateTimeZone.forID("UTC")).toString();
ISODate lastRunDate = new ISODate(lastRun);
HarvestHistoryRepository historyRepository = context.getBean(HarvestHistoryRepository.class);
HarvestHistory history = new HarvestHistory();
history.setDeleted(true);
history.setElapsedTime((int) elapsedTime);
history.setHarvestDate(lastRunDate);
history.setHarvesterName(ah.getParams().name);
history.setHarvesterType(ah.getType());
history.setHarvesterUuid(ah.getParams().uuid);
history.setInfo(historyEl);
history.setParams(ah.getParams().node);
historyRepository.save(history);
return OperResult.OK;
}}