use of org.exist.storage.ConsistencyCheckTask in project exist by eXist-db.
the class SanityReport method triggerCheck.
@Override
public void triggerCheck(String output, String backup, String incremental) {
try {
this.output = output;
final SystemTask task = new ConsistencyCheckTask();
final Properties properties = parseParameter(output, backup, incremental);
task.configure(pool.getConfiguration(), properties);
pool.triggerSystemTask(task);
} catch (final EXistException existException) {
taskstatus.setStatus(TaskStatus.Status.STOPPED_ERROR);
final List<ErrorReport> errors = new ArrayList<>();
errors.add(new ErrorReport(ErrorReport.CONFIGURATION_FAILD, existException.getMessage(), existException));
taskstatus.setReason(errors);
changeStatus(taskstatus);
taskstatus.setStatusChangeTime();
taskstatus.setReason(existException.toString());
LOG.warn("Failed to trigger db sanity check: {}", existException.getMessage(), existException);
}
}
Aggregations