try {
taskHistory = singularityClient.getHistoryForTask(taskId);
} catch (SingularityClientException sce) {
LOG.error("While fetching history for {}", taskId, sce);
statisticsBldr.incrErrorTasks();
continue;
}
if (cleanTask(taskDefinition.get(), taskHistory)) {
statisticsBldr.incrSuccessfullyCleanedTasks();