Search in sources :

Example 1 with FlattenedDataIntegrityReport

use of org.hisp.dhis.dataintegrity.FlattenedDataIntegrityReport in project dhis2-core by dhis2.

the class DataIntegrityTask method run.

// -------------------------------------------------------------------------
// Runnable implementation
// -------------------------------------------------------------------------
@Override
public void run() {
    Timer timer = new SystemTimer().start();
    FlattenedDataIntegrityReport report = dataIntegrityService.getFlattenedDataIntegrityReport();
    timer.stop();
    if (taskId != null) {
        notifier.notify(taskId, NotificationLevel.INFO, "Data integrity checks completed in " + timer.toString() + ".", true).addTaskSummary(taskId, report);
    }
}
Also used : SystemTimer(org.hisp.dhis.commons.timer.SystemTimer) Timer(org.hisp.dhis.commons.timer.Timer) FlattenedDataIntegrityReport(org.hisp.dhis.dataintegrity.FlattenedDataIntegrityReport) SystemTimer(org.hisp.dhis.commons.timer.SystemTimer)

Example 2 with FlattenedDataIntegrityReport

use of org.hisp.dhis.dataintegrity.FlattenedDataIntegrityReport in project dhis2-core by dhis2.

the class DataIntegrityJob method runReport.

private void runReport(JobConfiguration config, JobProgress progress, Set<String> checks) {
    Timer timer = new SystemTimer().start();
    notifier.notify(config, NotificationLevel.INFO, "Starting data integrity job", false);
    FlattenedDataIntegrityReport report = dataIntegrityService.getReport(checks, progress);
    timer.stop();
    notifier.notify(config, NotificationLevel.INFO, "Data integrity checks completed in " + timer + ".", true).addJobSummary(config, report, FlattenedDataIntegrityReport.class);
}
Also used : SystemTimer(org.hisp.dhis.commons.timer.SystemTimer) Timer(org.hisp.dhis.commons.timer.Timer) FlattenedDataIntegrityReport(org.hisp.dhis.dataintegrity.FlattenedDataIntegrityReport) SystemTimer(org.hisp.dhis.commons.timer.SystemTimer)

Aggregations

SystemTimer (org.hisp.dhis.commons.timer.SystemTimer)2 Timer (org.hisp.dhis.commons.timer.Timer)2 FlattenedDataIntegrityReport (org.hisp.dhis.dataintegrity.FlattenedDataIntegrityReport)2