use of org.entcore.common.aggregation.processing.AggregationProcessing in project statistics by OPEN-ENT-NG.
the class AggregateTask method handle.
@Override
public void handle(Long event) {
log.info("Execute AggregateTask.");
AggregationProcessing aggProcessing = new AggregationProcessingSequentialImpl();
IndicatorHelper.addIndicators(from, to, aggProcessing);
Handler<JsonObject> handler = (this.handler != null) ? this.handler : new Handler<JsonObject>() {
@Override
public void handle(JsonObject event) {
try {
if (!"ok".equals(event.getString("status", null))) {
log.error("Error in AggregateTask : status is different from ok." + event.toString());
}
} catch (Exception e) {
log.error("Error in AggregateTask when checking status", e);
}
}
};
aggProcessing.process(handler);
}
Aggregations